Skip to content

Instantly share code, notes, and snippets.

@tochiz
Created August 25, 2011 15:18
Show Gist options
  • Save tochiz/1170899 to your computer and use it in GitHub Desktop.
Save tochiz/1170899 to your computer and use it in GitHub Desktop.
cairo-1.10.2 for gentoo prefix work on lion patch.
--- a/src/cairo-quartz-font.c
+++ b/src/cairo-quartz-font.c
@@ -61,6 +61,10 @@
* This macro can be used to conditionally compile backend-specific code.
*/
+/* These functions have been removed on 10.7; as a workaround, just do
+ * a cast as the ATSFontRef and ATSUFontID should have the same value... */
+#define FMGetATSFontRefFromFont(x) ((ATSFontRef) x)
+
/* CreateWithFontName exists in 10.5, but not in 10.4; CreateWithName isn't public in 10.4 */
static CGFontRef (*CGFontCreateWithFontNamePtr) (CFStringRef) = NULL;
static CGFontRef (*CGFontCreateWithNamePtr) (const char *) = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment