[pango/hb-getters: 6/7] fc: Make pango_fc_font_kern_glyphs empty
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/hb-getters: 6/7] fc: Make pango_fc_font_kern_glyphs empty
- Date: Sat, 25 May 2019 01:30:30 +0000 (UTC)
commit f07f28a32dc8688111a469577f12f8e408bdf43f
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 24 16:54:34 2019 +0000
fc: Make pango_fc_font_kern_glyphs empty
This function has long been deprecated;
and it is is using freetype. So drop the
implementation.
pango/pangofc-font.c | 54 ----------------------------------------------------
1 file changed, 54 deletions(-)
---
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index da90c89e..d0b11804 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -701,60 +701,6 @@ void
pango_fc_font_kern_glyphs (PangoFcFont *font,
PangoGlyphString *glyphs)
{
- FT_Error error;
- FT_Vector kerning;
- int i;
- gboolean hinting = font->is_hinted;
- gboolean scale = FALSE;
- double xscale = 1;
- PangoFcFontKey *key;
-
- g_return_if_fail (PANGO_IS_FC_FONT (font));
- g_return_if_fail (glyphs != NULL);
-
- face = PANGO_FC_FONT_LOCK_FACE (font);
- if (G_UNLIKELY (!face))
- return;
-
- if (!FT_HAS_KERNING (face))
- {
- PANGO_FC_FONT_UNLOCK_FACE (font);
- return;
- }
-
- key = _pango_fc_font_get_font_key (font);
- if (key) {
- const PangoMatrix *matrix = pango_fc_font_key_get_matrix (key);
- PangoMatrix identity = PANGO_MATRIX_INIT;
- if (G_UNLIKELY (matrix && 0 != memcmp (&identity, matrix, 2 * sizeof (double))))
- {
- scale = TRUE;
- pango_matrix_get_font_scale_factors (matrix, &xscale, NULL);
- if (xscale) xscale = 1 / xscale;
- }
- }
-
- for (i = 1; i < glyphs->num_glyphs; ++i)
- {
- error = FT_Get_Kerning (face,
- glyphs->glyphs[i-1].glyph,
- glyphs->glyphs[i].glyph,
- ft_kerning_default,
- &kerning);
-
- if (error == FT_Err_Ok) {
- int adjustment = PANGO_UNITS_26_6 (kerning.x);
-
- if (hinting)
- adjustment = PANGO_UNITS_ROUND (adjustment);
- if (G_UNLIKELY (scale))
- adjustment *= xscale;
-
- glyphs->glyphs[i-1].geometry.width += adjustment;
- }
- }
-
- PANGO_FC_FONT_UNLOCK_FACE (font);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]