Not all fonts take effect

Issue #788 resolved
Michael Kapelko created an issue

CEGUI HG ce3f1bd08b58.

I have the following font files:

Arial-10.font: <?xml version="1.0" ?> <Font Name="Arial-10" Filename="LiberationSans-Regular.ttf" Type="FreeType" Size="10" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true"/>

Arial-12.font: <?xml version="1.0" ?> <Font Name="Arial-12" Filename="LiberationSans-Regular.ttf" Type="FreeType" Size="12" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true"/>

Arial-16.font: <?xml version="1.0" ?> <Font Name="Arial-16" Filename="LiberationSans-Regular.ttf" Type="FreeType" Size="16" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true"/>

I have the following Message.layout: <?xml version="1.0" encoding="UTF-8"?> <GUILayout > <Window Type="DefaultWindow" Name="Message" > <Property Name="Alpha" Value="0.7" /> <Property Name="AlwaysOnTop" Value="True" /> <Property Name="UnifiedAreaRect" Value="0,0},{0,0},{1,0},{1,0" /> <Window Type="Vanilla/StaticText" Name="Message/Text" > <Property Name="Font" Value="Arial-12" /> <Property Name="Text" Value="ARE_YOU_SURE" /> <Property Name="HorzFormatting" Value="WordWrapCentred" /> <Property Name="UnifiedAreaRect" Value="0,0},{0,0},{1,0},{1,0" /> </Window> </Window> </GUILayout>

Reproducibility: always

OS: ArchLinux, OS build: x86_64, Platform: Linux 3.3.6-1-ARCH x86_64

Comments (2)

  1. Michael Kapelko reporter

    As you can see, Arial-12 doesn't change anything and message is displayed with Arial-16: mj_font1.png [WRONG FONT]

    If I use Arial-10 for "Message/Text", CEGUI uses Arial-10: mj_font2.png [CORRECT FONT]

    However, if revert to Arial-12 for "Message/Text", and then change Arial-16.font contents to this: <?xml version="1.0" ?> <Font Name="Arial-16" Filename="LiberationSans-Regular.ttf" Type="FreeType" Size="12" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true"/> CEGUI still uses Arial-16, but now it's truly of size 12: mj_font3.png [CORRECT FONT, BUT IT'S A HACK]

    The question is why can't I use Arial-12? And why Arial-16 is always used?

  2. Log in to comment