Certain letters not appearing on screen

Started by Dave Gilbert, Thu 13/04/2017 01:10:22

Previous topic - Next topic

Dave Gilbert

I am encountering a bizarre problem and hopefully someone can help!

I am using the font "Cambria Bold" at size 16. When I set "anti-alias TTF fonts" to TRUE, The letter "S" goes magically missing:



But, when I set it to FALSE, the S displays just fine, but slightly smaller than it should be:



-Dave

I experimented with this font at various other sizes, and other letters go missing (or are shrunk). Specifically, the letter "H" at size 15.

Any light shedding is appreciated!

Gilbert

Does the S appear if you add a space before it?

dayowlron

When you pass in the string is the "S" capital and the other letters lower case?
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

Dave Gilbert

#3
@Dayowlron: Yes, it's the capital S that disappears. Should have been more specific.  The example I showed you IS all capital letters, but the letter does not appear regardless of what combinations of capital/lowercase letters there are.

@Gilbot: No, the S does not appear if I add a space before it.

Appreciate the help!

edit: Also, this problem occurs in every situation where text is displayed. On a GUI, on dialog options, display messages, text speech, you name it. That capital S does not appear. I loaded the font up in an editor, and it seems to look perfectly normal? So I am at a loss.

Crimson Wizard

#4
EDIT
Quote from: Dave Gilbert on Thu 13/04/2017 15:13:16I loaded the font up in an editor, and it seems to look perfectly normal?

Oh, so it does look properly in the editor? Hmm... that is puzzling, because editor uses same fonts library as engine.

What will happen if you display a single "S" in game?

To clarify, you are speaking of Microsoft font "Cambria Bold" that comes with Windows?

Dave Gilbert

The AGS editor, as well as font editors like Font Forge.

And yes, that is the correct font.

A single S is still invisible!

Thanks for the help, CW!

Crimson Wizard

IDK, I would think that this is again because AGS uses outdated fonts library, but then how does it work in the Editor, where it uses same library?

I could not find out, if the font is free or has to be purchased? If it's free, I would ask to upload it somewhere so that I could check this out under debugger.

Dave Gilbert

The font came with Windows, but your post made me wonder if the font got corrupted somehow. So I redownloaded it and... it works now.

Should have tried that AGES ago. I am an idiot. "Advanced" forum indeed.

Crimson Wizard

Wow.... that's a relief :)

BTW, regarding my question, I forgot that Windows hides individual fonts in Fonts folder, and shows only families. Indeed, Cambria Bold is also there.

PS. Still, it was weird that it worked in editor but not engine...

Dave Gilbert

Aaand spoke too soon. Now the "G" is invisible. :) Sigh.

Here's a link to the font.. If you can find anything, I'd appreciate any help as I really dig the font.

Crimson Wizard

I still think this is most certainly because of outdated font renderer in AGS.

There was this engine's build I made a while ago, it features updated fonts library: http://www.mediafire.com/download/j2w18bxw1yzh7o0/acwin_3.4.0.6--alfont-new.zip
It is AGS 3.4.0.6, but if you make a test game in AGS 3.2.1, for instance, it will be able to run it.

I can check out myself too, but only when I get spare time.

Dave Gilbert

I'll give it a test.

I am using the most recent beta (3.4.1.3). Is the build compatible with that?


Crimson Wizard

Quote from: Dave Gilbert on Thu 13/04/2017 15:46:10
I am using the most recent beta (3.4.1.3). Is the build compatible with that?
No, it is 3.4.0.6, that's more than a year old. That's why I suggested using older AGS for this test.

Dave Gilbert

Ah OK. I'll have to redownload that version of AGS and give it a test. Thanks.

Dave Gilbert

Sorry for the double post. I feel like an idiot here (not an uncommon occurrence, I know) but I can't seem to find the specific version of the engine that this acwin file will work with. The ones I download seem to be either too early or too recent. I hate to impose, but could you link me to the proper version? I'll give it a quick test and see what I find.

Crimson Wizard

Is not it work with 3.2.1?

I would update that build to latest version, but I do not have much free time right now.

BTW, this is one of the examples when I suspended an update because of backwards compatibility. I could upgrade this library about a year ago, but I did not manage to make it render some of the previously used AGS fonts properly (like the Lucas arts classic font used in all Maniac Mansion Mania games).

Danvzare

Quote from: Crimson Wizard on Tue 18/04/2017 09:16:15
I could upgrade this library about a year ago, but I did not manage to make it render some of the previously used AGS fonts properly (like the Lucas arts classic font used in all Maniac Mansion Mania games).
I remember that. I thought the way you managed to get it to render those fonts was rather acceptable considering the age of the games.
Personally though, I think that if it would fix problems like this, you should forgo the backwards compatibility. If anyone wants to play Maniac Mansion Mania on a newer computer, they could just use an older version of the engine which does have the backwards compatibility.

abstauber

Quotebut I did not manage to make it render some of the previously used AGS fonts properly (like the Lucas arts classic font used in all Maniac Mansion Mania games
If I recall correctly, that font was broken/corrupted anyway. That's why I replaced it with the one we have in the template.

Crimson Wizard

#18
Quote from: abstauber on Tue 18/04/2017 11:00:16
Quotebut I did not manage to make it render some of the previously used AGS fonts properly (like the Lucas arts classic font used in all Maniac Mansion Mania games
If I recall correctly, that font was broken/corrupted anyway. That's why I replaced it with the one we have in the template.

I wasn't aware of that. And MMM games are released in recent years, so I thought they are still using it.

Well, I guess I can push a library update after 3.4.1 if I'll have time. The changes are not too big.

There are still other solutions, like suggest override the font with another one, which works if you put it in the game folder.

Snarky

(Oh, sniped...)

Quote from: Danvzare on Tue 18/04/2017 10:56:35
I remember that. I thought the way you managed to get it to render those fonts was rather acceptable considering the age of the games.
Personally though, I think that if it would fix problems like this, you should forgo the backwards compatibility. If anyone wants to play Maniac Mansion Mania on a newer computer, they could just use an older version of the engine which does have the backwards compatibility.

Of course, those games are built with and run on an older version of the engine by default. The goal of running already-built old games with a newer version of the engine is, IMO, the lowest-priority form of backwards compatibility.

So the issue would be more that if the updated library can't display some fonts that used to work, is it broken? And if so, is there any benefit to updating from one buggy version to another buggy version? If the reason is not a library bug but that the font is actually corrupt, and if it is possible to fix/replace it, and if there aren't a ton of fonts out there with the same problem that should still be supported, then it seems worth doing.

Quote from: Crimson Wizard on Tue 18/04/2017 11:12:34
There are still other solutions, like suggest override the font with another one, which works if you put it in the game folder.

Oh, that's cool! I didn't know you could do that.

SMF spam blocked by CleanTalk