wolfspider / cairo-ios-gles

Implementation of the cairo library using OpenGL ES for iOS
5 stars 0 forks source link

Fonts not working #1

Open wolfspider opened 7 years ago

wolfspider commented 7 years ago

Need to move the quartz backend over and possibly adapt for iOS. Right now they don't seem to display anything on the GL surface and call "BAIL" on line 3265 of Cairo.c

wolfspider commented 7 years ago

Had a go at it today and incorrectly assumed quartz fonts worked in a similar way. So this is looking like a new font backend for UIFont and UIKit. Challenging to say the least- I think it will be worth it in the long run.

wolfspider commented 7 years ago

Nevermind just discovered coretext

wolfspider commented 7 years ago

CoreText has been implemented in iOS alongside CoreGraphics to draw GL glyphs just like in *UnsafeSystem. Right now we are getting GL Error: 1282 while the MSAA compositor is trying to write the glyphs from the font into its surfaces. When the device context releases after running through render_glyphs() the error shuts down the Cairo GLKView. In this screenshot you can see the section of code that I'm trying to debug.

glglypherror

wolfspider commented 7 years ago

With the latest commit we are starting to see something...on the screen

pathtext - 1

wolfspider commented 6 years ago

Switch to FreeType 2 on iOS just to debug this a little better and now getting this still having problems with "Scratch GL Surface" creation. Images may be an option but ImageSurface seems weird and not showing up- may have to rebuild pixman.

img_0052

wolfspider commented 6 years ago

Have included Freetype2 now to no avail simply looking at conversion of A8 texture which doesn't seem to work. Absolutely certain the text system needs to be overhauled specifically for iOS and OpenGL ES but where to start?