@@ -92,8 +92,10 @@ static int (*CGFontGetAscentPtr) (CGFontRef fontRef) = NULL;
9292static int (* CGFontGetDescentPtr ) (CGFontRef fontRef ) = NULL ;
9393static int (* CGFontGetLeadingPtr ) (CGFontRef fontRef ) = NULL ;
9494
95+ #ifdef CAIRO_HAS_QUARTZ_ATSUFONTID
9596/* Not public anymore in 64-bits nor in 10.7 */
96- static ATSFontRef (* FMGetATSFontRefFromFontPtr ) (FMFont iFont ) = NULL ;
97+ static ATSFontRef (* FMGetATSFontRefFromFontPtr ) (ATSUFontID iFont ) = NULL ;
98+ #endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
9799
98100static cairo_bool_t _cairo_quartz_font_symbol_lookup_done = FALSE;
99101static cairo_bool_t _cairo_quartz_font_symbols_present = FALSE;
@@ -133,7 +135,9 @@ quartz_font_ensure_symbols(void)
133135 CGContextGetAllowsFontSmoothingPtr = dlsym (RTLD_DEFAULT , "CGContextGetAllowsFontSmoothing" );
134136 CGContextSetAllowsFontSmoothingPtr = dlsym (RTLD_DEFAULT , "CGContextSetAllowsFontSmoothing" );
135137
138+ #ifdef CAIRO_HAS_QUARTZ_ATSUFONTID
136139 FMGetATSFontRefFromFontPtr = dlsym (RTLD_DEFAULT , "FMGetATSFontRefFromFont" );
140+ #endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
137141
138142 if ((CGFontCreateWithFontNamePtr || CGFontCreateWithNamePtr ) &&
139143 CGFontGetGlyphBBoxesPtr &&
@@ -814,6 +818,7 @@ _cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *abstract_font)
814818/*
815819 * compat with old ATSUI backend
816820 */
821+ #ifdef CAIRO_HAS_QUARTZ_ATSUFONTID
817822
818823/**
819824 * cairo_quartz_font_face_create_for_atsu_font_id:
@@ -857,3 +862,5 @@ cairo_atsui_font_face_create_for_atsu_font_id (ATSUFontID font_id)
857862{
858863 return cairo_quartz_font_face_create_for_atsu_font_id (font_id );
859864}
865+
866+ #endif /* CAIRO_HAS_QUARTZ_ATSUFONTID */
0 commit comments