#include "ass_utils.h"
#include "ass_shaper.h"
-#define VERTICAL_LOWER_BOUND 0x02f1
-
/**
* Select a good charmap, prefer Microsoft Unicode charmaps.
* Otherwise, let FreeType decide.
struct ass_shaper_metrics_data {
Cache *metrics_cache;
GlyphMetricsHashKey hash_key;
+ int vertical;
};
struct ass_shaper_font_data {
if (!metrics)
return 0;
+ if (metrics_priv->vertical && glyph > VERTICAL_LOWER_BOUND)
+ return metrics->metrics.vertAdvance;
+
return metrics->metrics.horiAdvance;
}
struct ass_shaper_metrics_data *metrics =
font->shaper_priv->metrics_data[info->face_index];
metrics->metrics_cache = shaper->metrics_cache;
+ metrics->vertical = info->font->desc.vertical;
hb_font_funcs_t *funcs = hb_font_funcs_create();
font->shaper_priv->font_funcs[info->face_index] = funcs;