Hi, i have problem with error message font. If is the file CharisSILB.ttf in same directory as ./devilutionx binary everything is OK.
But what to do if i want have this font in /usr/share/fonts ?
Is best solution patch source code fonts.cpp:61 before packaging for linux like this? :
font = TTF_OpenFont("/usr/share/fonts/truetype/CharisSILB.ttf", 17);
Be sure without it i get:
TTF_OpenFont: Couldn't open CharisSILB.ttf

Is there any way how to request font by name but not by filename ?
Any adivises how to do best ?
Thank for any help
I want it for Debian & Fedora packaging to be nice done without nasty symlinks or any other ugly hacks.
Unfortunately I haven't been able to find any (especially not cross-platform) way of requesting a font, the only solution I could find was to request it the way you see here. Especially on Mac this is a bit odd since the file is actually located in ../resources but that is the current folder when running a program from a bundle.
So yes, if you want to also install it as a system font then I think a patch is your only solution. I'm not sure I would recommend that you install it though since it's not the full font set, and if a user decides to uninstall it then the application won't run.
How do applications normally handle their resources being scattered all over the file system? It's something that has always been less than ideal IMO on Linux distributions (I understand it helps with sharing files between applications that have the same dependencies, but in cases like this it feels like it has been taken to the extream, also I run Linux as my operating system so no hate :P).
Ok. I'l fix it in debian/redhat package building.
Thank you for your point of view.
P.s. Here you can find my RPMs: https://build.opensuse.org/package/show/home:vitexus/devilutionX

p.s.s. Font problem not fixed yet. Please wait for next builds.
Cool thanks for doing this, ps if you can find a good name for it maybe we can add the path as an ifdef.
Is this solution acceptable for you ?:
debian/rules:
export DEB_CFLAGS_MAINT_APPEND = -Wno-error -DMSG_FONT=/usr/share/fonts/truetype/CharisSILB.ttf
fonts.cpp:

Or second solution way:

https://stackoverflow.com/questions/39805355/use-sdl2-ttf-to-open-a-system-font/39835756
On Tue, Oct 8, 2019 at 12:10 AM Cybervitexus notifications@github.com
wrote:
Or second solution way:
[image: obrazek]
https://user-images.githubusercontent.com/2621130/66352550-06b26e80-e960-11e9-8091-373723de1d07.png—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/diasurgical/devilutionX/issues/333?email_source=notifications&email_token=ACC5VBODK2WLQ72BJIBYWUTQNOXV3A5CNFSM4I5563Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAR66HI#issuecomment-539225885,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACC5VBI62VKK4LOBGQBBUJTQNOXV3ANCNFSM4I5563QQ
.
Oh looks like we will need that anyway for translation support, feel free to send a patch that allows it to open system fonts :)