summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-04-14 22:15:30 +0200
committerTor Lillqvist <tml@iki.fi>2012-04-15 11:56:47 +0200
commit83ba7b4e8f67cc3a21fbaf476621af509032ae47 (patch)
treeaaec12fd4e53165fd5309bf2f2c6b6a96f754c57 /canvas
parent640b8ebb668d466f348329915deba874e15e4b8f (diff)
Copy and adapt current state of Norbert's CoreText work for iOS
Compiles, but I obviously have no idea how it works yet. Yes, eventually we should factor out common parts from the iOS and MacOSX code.
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 063dc0d5cfb9..30493f9e2e63 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -65,6 +65,10 @@
# error Native API needed.
#endif
+#ifdef IOS
+#include <CoreText/CoreText.h>
+#endif
+
using namespace ::cairo;
using namespace ::com::sun::star;
@@ -507,7 +511,7 @@ namespace cairocanvas
// when CGFont (Mac OS X 10.5 API) is provided by the AQUA VCL backend.
font_face = cairo_quartz_font_face_create_for_atsu_font_id((ATSUFontID) rSysFontData.aATSUFontID);
# else // iOS
- font_face = cairo_quartz_font_face_create_for_cgfont( rSysFontData.rFont);
+ font_face = cairo_quartz_font_face_create_for_cgfont( CTFontCopyGraphicsFont( (CTFontRef) rSysFontData.rCTFont, NULL ) );
# endif
#elif defined CAIRO_HAS_WIN32_SURFACE