I’m trying to show some texts written in Croatian language in my OF application.
The text includes characters like this one “više muška šest žena”, which show as question marks in my application.
I already saw this post but wasn’t successfull as there was not much guidance and i’m pretty new to OF.
Can anyone guide me in the right direction?
ofTrueTypeFont will only deal with ASCII characters, if your string need UTF-8 encoding it will probably won’t work.
That is to say, if the characters you want to draw are out of the 0-255 possible ones in the ASCII specs, you’re out of luck and will need to use a different font engine.
as @silverbahamut says you might need a different font engine. Checkout ofxaddons.com for font engines. There are several. I think that ofxFont will make the job.
best
Hii
Thanks for your help @roymacdonald@silverbahamut.
I tried it with ofxFontStash and was successfull on windows, but I can’t get it to compile on Ubuntu.
Since this is a different issue, I created another topic for it.
Thanks @Meach
I used ofxTrueTypeFontUC and it works.
The only thing is that the text looks jigged, like it is a low quality text. Even when I try it with AntiAliasing set to true, it’s also like tha. Do you have any idea what might cause this?
Now you are saying this, I might have had the same problem. But in my case it was fine and was not looking too bad compared to the rest so don’t think I did anything to fix it.
I have also another issue, which is that some of the croatian characters are not shown correctly even with the ofxTrueTypeFontUC addon.
So characters like “ž” are shown correctly, but with characters like “č” or “ć” I get an empty square in place of the character.
Any suggestions?
EDIT: I solved the second problem by changing my font. Apparently the first font I used didn’t support all the characters. I’m still working on the low quality issue!