COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 03-20-2018, 06:12 AM   #1
Andi!
Human being with feelings
 
Andi!'s Avatar
 
Join Date: Nov 2015
Location: Germany
Posts: 78
Default Embedded custom fonts without Cairo

Hi there,

I'm wrapping my head around the idea to implement a simple custom (ttf) font inclusion baked directly into the plug-in resources (instead of installing the fonts to the system). I know, there is the Cairo stuff, it's great. But on the other hand it seems a little bit oversized to me. Maybe there is already some kind of other implementation ?

What we could do:
Global:
- add (e.g. free google) ttf file to the resources, adjust resource.h etc.

Windows:
- call FindResource
- Load/Lock/SizeofResource
- call AddFontMemResourceEx
-> IPlug CreateFont should find the font now

OS X:
- include font in the project, how described here: https://www.cocoanetics.com/2013/03/...th-dtcoretext/
- or load the file manually how it is done with Bitmaps in LoadImgFromResourceOSX
-> Swells CreateFont emulation could find the font via the existing CTFontCreateWithName
- ???

I'm totally unsure about the OS X part. Before giving it a try, I would like to ask you all, if somebody already tried something similar and if such an implementaion would make sense ? Maybe I missed a thread about it. It's clear that such a simple implementation doesn't support outlined text and many other things.

Cheers
Andi! is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.