Skip to content

Commit

Permalink
Fixes #103
Browse files Browse the repository at this point in the history
  • Loading branch information
RMichelsen committed Nov 8, 2023
1 parent c4e9a47 commit 37fd670
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ void DrawGridLine(Renderer *renderer, int row) {
rect.bottom - rect.top,
&temp_text_layout
));
size_t grid_chars_length = renderer->wchar_buffer_length;
IDWriteTextLayout1 *text_layout;
temp_text_layout->QueryInterface<IDWriteTextLayout1>(&text_layout);
temp_text_layout->Release();
Expand Down Expand Up @@ -621,13 +622,13 @@ void DrawGridLine(Renderer *renderer, int row) {
D2D1_RECT_F last_rect = rect;
last_rect.left = col_offset * renderer->font_width;
DrawBackgroundRect(renderer, last_rect, &renderer->hl_attribs[hl_attrib_id]);
ApplyHighlightAttributes(renderer, &renderer->hl_attribs[hl_attrib_id], text_layout, col_offset_wchars, renderer->wchar_buffer_length);
ApplyHighlightAttributes(renderer, &renderer->hl_attribs[hl_attrib_id], text_layout, col_offset_wchars, grid_chars_length);

renderer->d2d_context->PushAxisAlignedClip(rect, D2D1_ANTIALIAS_MODE_ALIASED);
if(renderer->disable_ligatures) {
text_layout->SetTypography(renderer->dwrite_typography, DWRITE_TEXT_RANGE {
.startPosition = 0,
.length = static_cast<uint32_t>(renderer->wchar_buffer_length)
.length = static_cast<uint32_t>(grid_chars_length)
});
}
text_layout->Draw(renderer, renderer->glyph_renderer, 0.0f, rect.top);
Expand Down

0 comments on commit 37fd670

Please sign in to comment.