summaryrefslogtreecommitdiff
path: root/modules/basic/basic-atsui.c
diff options
context:
space:
mode:
authorKristian Rietveld <kris@gtk.org>2010-02-28 13:48:22 +0100
committerKristian Rietveld <kris@gtk.org>2010-02-28 13:49:22 +0100
commit77f99dd9e17c5051b2b2dcfe6e7746f924e9f71b (patch)
treee07d41d90391dad096eed27ef3c40953123e2327 /modules/basic/basic-atsui.c
parent2c858fe6b36801e731fe764c1085a2cbcbc04037 (diff)
downloadpango-77f99dd9e17c5051b2b2dcfe6e7746f924e9f71b.tar.gz
Bug 608923 - Incorrect/broken ligatures on MacOS
Fix the basic ATSUI to probably work on 64-bit Snow Leopard. The main culprit was most probably in the usage of CGFontRef, where ATSUFontID was expected.
Diffstat (limited to 'modules/basic/basic-atsui.c')
-rw-r--r--modules/basic/basic-atsui.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/basic/basic-atsui.c b/modules/basic/basic-atsui.c
index a3df773d..369a596a 100644
--- a/modules/basic/basic-atsui.c
+++ b/modules/basic/basic-atsui.c
@@ -86,21 +86,24 @@ basic_engine_shape (PangoEngineShape *engine,
const char *p;
PangoATSUIFont *afont = PANGO_ATSUI_FONT (font);
ATSUStyle style;
- CGFontRef fontID;
+ ATSUFontID fontID;
ATSUAttributeTag styleTags[] = { kATSUFontTag };
ATSUAttributeValuePtr styleValues[] = { &fontID };
- ByteCount styleSizes[] = { sizeof (CGFontRef) };
+ ByteCount styleSizes[] = { sizeof (ATSUFontID) };
utf16 = g_utf8_to_utf16 (text, length, NULL, &n16, NULL);
- err = ATSUCreateTextLayout (&text_layout);
- err = ATSUSetTextPointerLocation (text_layout, utf16, 0, n16, n16);
+ err = ATSUCreateTextLayoutWithTextPtr (utf16, 0, n16, n16,
+ 0,
+ NULL,
+ NULL,
+ &text_layout);
err = ATSUCreateStyle(&style);
- fontID = pango_atsui_font_get_cgfont (afont);
+ fontID = pango_atsui_font_get_atsfont (afont);
err = ATSUSetAttributes(style,
- sizeof(styleTags) / sizeof(styleTags[0]),
+ (ItemCount)(sizeof(styleTags) / sizeof(styleTags[0])),
styleTags, styleSizes, styleValues);
err = ATSUSetRunStyle(text_layout,