Skip to content

Commit

Permalink
fix rotated argb glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Nov 24, 2024
1 parent 60add37 commit 8212c29
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions win32/dwfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ dwrite_draw_bitmap( Handle self, uint16_t index, Point size, Point aperture )
t.glyphs = &index;
t.advances = &dummy_advance;
t.positions = dummy_offset;
if ( !( enumerator = get_enumerator(self, sys dc_font, &t, aperture.x, size.y + aperture.y)))
if ( !( enumerator = get_enumerator(self, sys dc_font, &t, 0, 0)))
return NULL;

l = enumerate_colorrun( enumerator, t.len );
Expand All @@ -476,13 +476,15 @@ dwrite_draw_bitmap( Handle self, uint16_t index, Point size, Point aperture )
save_font = SelectObject(dc, sys dc_font->hfont);
SetTextAlign( dc, TA_BASELINE);
SetBkMode ( dc, TRANSPARENT);
if ( !prima_matrix_is_identity( var current_state.matrix )) {
{
Matrix *m = &var current_state.matrix;
XFORM xf = {
(*m)[0], -((*m)[1]),
-((*m)[2]), (*m)[3],
0, 0
(*m)[0], -(*m)[1],
-(*m)[2], (*m)[3],
-aperture.x,
(size.y + aperture.y)
};
SetGraphicsMode( dc, GM_ADVANCED);
SetWorldTransform( dc, &xf );
}

Expand Down

0 comments on commit 8212c29

Please sign in to comment.