Very weird error with basic font use

Started by DarkMoe, Thu 18/01/2018 21:25:31

Previous topic - Next topic

DarkMoe

Ok, I'm really out of ideas here.

Basically, I just wanted to change the fonts, I downloaded a ttf, imported it as fntDefault, size 14, outlineFont = 2, outlineStyle = useOutlineFont.

I saw there were 4 fonts by default (fntSpeech, fntTiny, and another one which I deleted).

There 2 very weird issues:
1) fntTiny appears duplicating the text of the fntDefault or fntSpeech. Everytime a character speaks, there are 2 lines of dialogue in the same place, but with different sizes, a workaround was to put the same size to fntTiny as the size of fntDefault (because, for some reason, the engine won't let me delete fntTiny).
2) No matter what I put in outlineFont and style, font will never have an outline. I tried to put the exact same configuration on all 3 fonts (default, speech and tiny), and still doesn't work.

Also, for some reason, the fntTiny property "sourceFilename" comes with a path from someone else computer ! "C:\Users\Björn 'Ghost' Ludwig\Desktop\Mythaumatology Assets\Assets\Game Fonts\FONT.010"

I'm out of options, thanks !

Matti

You're setting font 2 as an outline font, so maybe that causes the two lines of speech? I've never used that before, but maybe the font sizes are too different?

If you set OutlineFont to 0 and OutlineStyle to automatic, is there still no outline? Works for me all the time.

DarkMoe

That's it, I was under the impression that number 2 was the thickness of the border, not the id of other font, wow,

Also regarding those hardcoded fonts, maybe that's something that should be fixed eventually

Cassiebsg

Those hard coded fonts are part of the template you choose to use (you are not obliged to use a template, you can just choose to start with a blank "canvas".).
The tiny font was likely being used and thus you were unable to delete it. Was Tiny font ID 2?
There are those who believe that life here began out there...

Crimson Wizard

#4
Quote from: DarkMoe on Thu 18/01/2018 21:25:31
Also, for some reason, the fntTiny property "sourceFilename" comes with a path from someone else computer ! "C:\Users\Björn 'Ghost' Ludwig\Desktop\Mythaumatology Assets\Assets\Game Fonts\FONT.010"
This is a path on template author's PC, I believe, guess they did not remove it.


Quote from: DarkMoe on Thu 18/01/2018 22:02:33
Also regarding those hardcoded fonts, maybe that's something that should be fixed eventually

Font usage in AGS is not hardcoded (except maybe few "special" places like console, and others which I don't remember atm). You may e.g. change the font you are using for speech:
Code: ags

Game.SpeechFont = eMyNewFont;

SMF spam blocked by CleanTalk