[pango/visible-things: 11/35] Pass shape flags through to pangofc_shape



commit d23bf4e1edce346f6b928b637625066f62f44c2c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jul 7 13:07:18 2019 -0400

    Pass shape flags through to pangofc_shape
    
    As long as we have the engine API in the way here,
    we need to funnel flags through unused bits in the
    PangoAnalysis struct. This should be fixed up once
    we use harfbuzz for shaping everywhere, and can
    cut out the engine.

 pango/pangofc-shape.c | 4 ++++
 pango/shape.c         | 5 +++++
 2 files changed, 9 insertions(+)
---
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index b062bd26..dfabfa16 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -341,10 +341,14 @@ _pango_fc_shape (PangoFont           *font,
   double x_scale_inv, y_scale_inv;
   PangoGlyphInfo *infos;
   const char *variations;
+  PangoShapeFlags flags;
 
   g_return_if_fail (font != NULL);
   g_return_if_fail (analysis != NULL);
 
+  /* FIXME: Pass flags separately */
+  flags = analysis->flags >> 4;
+
   fc_font = PANGO_FC_FONT (font);
   ft_face = pango_fc_font_lock_face (fc_font);
   if (!ft_face)
diff --git a/pango/shape.c b/pango/shape.c
index fb2e980f..447d9b55 100644
--- a/pango/shape.c
+++ b/pango/shape.c
@@ -141,6 +141,11 @@ pango_shape_with_options (const gchar      *item_text,
   g_return_if_fail (paragraph_text <= item_text);
   g_return_if_fail (paragraph_text + paragraph_length >= item_text + item_length);
 
+  /* FIXME: as long as engines are in the way, we have to
+   * funnel the flags through unused bits in the analysis
+   */
+  ((PangoAnalysis*)analysis)->flags |= flags << 4;
+
   if (G_LIKELY (analysis->shape_engine && analysis->font))
     {
       _pango_engine_shape_shape (analysis->shape_engine, analysis->font,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]