Hello OF community!
I am not that new to OF but I do am new to OF for iOS.
I have been searching for the past month ways to parse the system font files inside the iThing (iPad, iPhone, iPod touch
) and to load them as a vector of ofTrueTypeFont
But I can’t find the path to the folder containing all the system fonts. So this is a first problem I have
The second problem I have is to be able to parse a folder inside iOS and have in return all the files contained inside this folder
The last problem I have (and this because I could not manage to find the fonts) wold be to know if it is possible to load the fonts into an ofTrueTypeFont variable.
My aim here is to be able to have a folder with all the fonts and to be able to load several fonts and/or to be aware of what are the font options
Maybe I wasn’t efficient searching both the OF forum and the web
If any of you could help me (it can also be a “dude, this is simply impossible to make, the guys at Apple are really stressed with you messing around with the system files”) I would appreciate a lot
If my question is not clear enough I will be happy to clarify my issues.
Thanks in advance
As far as I understand, and I might be wrong, the only way to list the fonts (without jailbreaking your phone) is to call
NSArray *familyNames = [UIFont familyNames];
that’s not going to help you get them into ofTrueTypeFont though, you can use custom fonts: (for some reason the new forum won’t let me post links but go to: freetimestudios.com/2010/09/20/ipad-and-ios-4-custom-font-loading I’m not sure that helps you with what you’re trying to do, but it at least shows you how to add in a font.
This function is kind of nice but only returns an array object with UIFont*s
That can be used with Objective C language and Cocoa Touch framework
I am trying to study some more Objective C (and therefore Cocoa Touch Framework). An I was wondering if it was possible to mix Cocoa Touch, Objective C, C++ and OpenFrameworks in order to get the best of each framework. I still don’t know enough Objective C to know what are the advantages and limitations for using their font objects to display text.
Of course, I know what I was asking is perfectly possible with a jailbroken device, but I do not want to get involved with jailbreaking, even though I do not believe the closed system apple setup around iOs is perfectly nice and fit.
I will keep on with my researches and case I can manage to come out with something I will be more then happy to share it with the community.
I was also looking for ways to compile OpenCV for iOs but this is a totally different topic…
Oh, and I forgot, the problem with custom fonts is that I am really bad with all the juridic implications using fonts and I am quite scared to do something “wrong” or “bad” by mistake.
I respect A LOT the work of font developers and I admire their work, but I am still a student and don’t have much money to buy my own set of fonts, so I try to stick to the default system fonts set that is nice enough for now and that is pre-installed (and therefore the license issue fades out).
One day I will study law, not to become a lawyer but to understand all this copyright, license, etc stuff… (it’s the kind of things we don’t learn at school)