projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87af454
)
Fix glyph cache entry sizing
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 17 Sep 2021 17:17:53 +0000
(13:17 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 17 Sep 2021 17:38:29 +0000
(13:38 -0400)
The subpixel-positioned glyph extends on both sides.
gsk/ngl/gsknglglyphlibrary.c
patch
|
blob
|
history
diff --git
a/gsk/ngl/gsknglglyphlibrary.c
b/gsk/ngl/gsknglglyphlibrary.c
index 8ddf1ab265fc1e7eb8c7dba70f311546ca641508..9c184ed0f761087ecf1570d71245be5b0a51db46 100644
(file)
--- a/
gsk/ngl/gsknglglyphlibrary.c
+++ b/
gsk/ngl/gsknglglyphlibrary.c
@@
-290,9
+290,15
@@
gsk_ngl_glyph_library_add (GskNglGlyphLibrary *self,
pango_extents_to_pixels (&ink_rect, NULL);
if (key->xshift != 0)
- ink_rect.width++;
+ {
+ ink_rect.x -= 1;
+ ink_rect.width += 2;
+ }
if (key->yshift != 0)
- ink_rect.height++;
+ {
+ ink_rect.y -= 1;
+ ink_rect.height += 2;
+ }
width = (int) ceil (ink_rect.width * key->scale / 1024.0);
height = (int) ceil (ink_rect.height * key->scale / 1024.0);