[pango/pango-1-46: 4/9] Fix placement of marks in upright vertical text.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-46: 4/9] Fix placement of marks in upright vertical text.
- Date: Sun, 9 May 2021 01:32:55 +0000 (UTC)
commit 634621b09e232bf51a9c89c177743dbc851e543a
Author: Tavmjong Bah <tavmjong free fr>
Date: Wed Mar 17 14:37:13 2021 +0100
Fix placement of marks in upright vertical text.
(cherry-picked from commit 3396cc20)
pango/pangofc-fontmap.c | 5 ++---
pango/pangofc-shape.c | 7 ++-----
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 341b2d6c..35187c7c 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1614,7 +1614,6 @@ pango_fc_make_pattern (const PangoFontDescription *description,
int slant;
double weight;
PangoGravity gravity;
- FcBool vertical;
char **families;
int i;
int width;
@@ -1625,7 +1624,6 @@ pango_fc_make_pattern (const PangoFontDescription *description,
width = pango_fc_convert_width_to_fc (pango_font_description_get_stretch (description));
gravity = pango_font_description_get_gravity (description);
- vertical = PANGO_GRAVITY_IS_VERTICAL (gravity) ? FcTrue : FcFalse;
/* The reason for passing in FC_SIZE as well as FC_PIXEL_SIZE is
* to work around a bug in libgnomeprint where it doesn't look
@@ -1634,13 +1632,14 @@ pango_fc_make_pattern (const PangoFontDescription *description,
* Putting FC_SIZE in here slightly reduces the efficiency
* of caching of patterns and fonts when working with multiple different
* dpi values.
+ *
+ * Do not pass FC_VERTICAL_LAYOUT true as HarfBuzz shaping assumes false.
*/
pattern = FcPatternBuild (NULL,
PANGO_FC_VERSION, FcTypeInteger, pango_version(),
FC_WEIGHT, FcTypeDouble, weight,
FC_SLANT, FcTypeInteger, slant,
FC_WIDTH, FcTypeInteger, width,
- FC_VERTICAL_LAYOUT, FcTypeBool, vertical,
#ifdef FC_VARIABLE
FC_VARIABLE, FcTypeBool, FcDontCare,
#endif
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index 16d5d84d..5c716b24 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -409,12 +409,9 @@ pango_hb_shape (PangoFont *font,
for (i = 0; i < num_glyphs; i++)
{
/* 90 degrees rotation counter-clockwise. */
- hb_position_t x_origin = 0, y_origin = 0;
- hb_font_get_glyph_v_origin
- (hb_font, infos[i].glyph, &x_origin, &y_origin);
infos[i].geometry.width = - hb_position->y_advance;
- infos[i].geometry.x_offset = - hb_position->y_offset - y_origin;
- infos[i].geometry.y_offset = - hb_position->x_offset - x_origin;
+ infos[i].geometry.x_offset = - hb_position->y_offset;
+ infos[i].geometry.y_offset = - hb_position->x_offset;
hb_position++;
}
else /* horizontal */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]