ceed-snapshot11 doesn't load pixmap fonts

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

zadirion
Just popping in
Just popping in
Posts: 17
Joined: Sat May 07, 2011 14:38

ceed-snapshot11 doesn't load pixmap fonts

Postby zadirion » Wed Feb 13, 2013 19:25

Hi,

Is this a known limitation?
I'm trying to load a font in CEED:

Code: Select all

<?xml version="1.0" ?>
<Font Name="Viga" Filename="Viga.imageset" Type="Pixmap" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false">
<Mapping Codepoint="0032" Image="0032" HorzAdvance="4"/>
<Mapping Codepoint="0033" Image="0033" HorzAdvance="6" />
<Mapping Codepoint="0034" Image="0034" HorzAdvance="6" />
<Mapping Codepoint="0035" Image="0035" HorzAdvance="10" />
<Mapping Codepoint="0036" Image="0036" HorzAdvance="8" />
<Mapping Codepoint="0037" Image="0037" HorzAdvance="14" />
<Mapping Codepoint="0038" Image="0038" HorzAdvance="12" />
<Mapping Codepoint="0039" Image="0039" HorzAdvance="4" />
<Mapping Codepoint="0040" Image="0040" HorzAdvance="6" />
<Mapping Codepoint="0041" Image="0041" HorzAdvance="6" />
<Mapping Codepoint="0042" Image="0042" HorzAdvance="8" />
<Mapping Codepoint="0043" Image="0043" HorzAdvance="10" />
<Mapping Codepoint="0044" Image="0044" HorzAdvance="4" />
<Mapping Codepoint="0045" Image="0045" HorzAdvance="6" />
<Mapping Codepoint="0046" Image="0046" HorzAdvance="4" />
<Mapping Codepoint="0047" Image="0047" HorzAdvance="6" />
<Mapping Codepoint="0048" Image="0048" HorzAdvance="10" />
<Mapping Codepoint="0049" Image="0049" HorzAdvance="6" />
<Mapping Codepoint="0050" Image="0050" HorzAdvance="10" />
<Mapping Codepoint="0051" Image="0051" HorzAdvance="10" />
<Mapping Codepoint="0052" Image="0052" HorzAdvance="10" />
<Mapping Codepoint="0053" Image="0053" HorzAdvance="10" />
<Mapping Codepoint="0054" Image="0054" HorzAdvance="10" />
<Mapping Codepoint="0055" Image="0055" HorzAdvance="10" />
<Mapping Codepoint="0056" Image="0056" HorzAdvance="10" />
<Mapping Codepoint="0057" Image="0057" HorzAdvance="10" />
<Mapping Codepoint="0058" Image="0058" HorzAdvance="4" />
<Mapping Codepoint="0059" Image="0059" HorzAdvance="4" />
<Mapping Codepoint="0060" Image="0060" HorzAdvance="8" />
<Mapping Codepoint="0061" Image="0061" HorzAdvance="10" />
<Mapping Codepoint="0062" Image="0062" HorzAdvance="8" />
<Mapping Codepoint="0063" Image="0063" HorzAdvance="8" />
<Mapping Codepoint="0064" Image="0064" HorzAdvance="14" />
<Mapping Codepoint="0065" Image="0065" HorzAdvance="10" />
<Mapping Codepoint="0066" Image="0066" HorzAdvance="10" />
<Mapping Codepoint="0067" Image="0067" HorzAdvance="10" />
<Mapping Codepoint="0068" Image="0068" HorzAdvance="10" />
<Mapping Codepoint="0069" Image="0069" HorzAdvance="10" />
<Mapping Codepoint="0070" Image="0070" HorzAdvance="8" />
<Mapping Codepoint="0071" Image="0071" HorzAdvance="10" />
<Mapping Codepoint="0072" Image="0072" HorzAdvance="10" />
<Mapping Codepoint="0073" Image="0073" HorzAdvance="4" />
<Mapping Codepoint="0074" Image="0074" HorzAdvance="8" />
<Mapping Codepoint="0075" Image="0075" HorzAdvance="10" />
<Mapping Codepoint="0076" Image="0076" HorzAdvance="8" />
<Mapping Codepoint="0077" Image="0077" HorzAdvance="12" />
<Mapping Codepoint="0078" Image="0078" HorzAdvance="10" />
<Mapping Codepoint="0079" Image="0079" HorzAdvance="10" />
<Mapping Codepoint="0080" Image="0080" HorzAdvance="10" />
<Mapping Codepoint="0081" Image="0081" HorzAdvance="10" />
<Mapping Codepoint="0082" Image="0082" HorzAdvance="10" />
<Mapping Codepoint="0083" Image="0083" HorzAdvance="10" />
<Mapping Codepoint="0084" Image="0084" HorzAdvance="10" />
<Mapping Codepoint="0085" Image="0085" HorzAdvance="10" />
<Mapping Codepoint="0086" Image="0086" HorzAdvance="10" />
<Mapping Codepoint="0087" Image="0087" HorzAdvance="14" />
<Mapping Codepoint="0088" Image="0088" HorzAdvance="10" />
<Mapping Codepoint="0089" Image="0089" HorzAdvance="10" />
<Mapping Codepoint="0090" Image="0090" HorzAdvance="10" />
<Mapping Codepoint="0091" Image="0091" HorzAdvance="6" />
<Mapping Codepoint="0092" Image="0092" HorzAdvance="6" />
<Mapping Codepoint="0093" Image="0093" HorzAdvance="6" />
<Mapping Codepoint="0094" Image="0094" HorzAdvance="10" />
<Mapping Codepoint="0095" Image="0095" HorzAdvance="10" />
<Mapping Codepoint="0096" Image="0096" HorzAdvance="8" />
<Mapping Codepoint="0097" Image="0097" HorzAdvance="10" />
<Mapping Codepoint="0098" Image="0098" HorzAdvance="10" />
<Mapping Codepoint="0099" Image="0099" HorzAdvance="8" />
<Mapping Codepoint="0100" Image="0100" HorzAdvance="10" />
<Mapping Codepoint="0101" Image="0101" HorzAdvance="10" />
<Mapping Codepoint="0102" Image="0102" HorzAdvance="6" />
<Mapping Codepoint="0103" Image="0103" HorzAdvance="10" />
<Mapping Codepoint="0104" Image="0104" HorzAdvance="8" />
<Mapping Codepoint="0105" Image="0105" HorzAdvance="4" />
<Mapping Codepoint="0106" Image="0106" HorzAdvance="6" />
<Mapping Codepoint="0107" Image="0107" HorzAdvance="8" />
<Mapping Codepoint="0108" Image="0108" HorzAdvance="4" />
<Mapping Codepoint="0109" Image="0109" HorzAdvance="14" />
<Mapping Codepoint="0110" Image="0110" HorzAdvance="8" />
<Mapping Codepoint="0111" Image="0111" HorzAdvance="10" />
<Mapping Codepoint="0112" Image="0112" HorzAdvance="8" />
<Mapping Codepoint="0113" Image="0113" HorzAdvance="10" />
<Mapping Codepoint="0114" Image="0114" HorzAdvance="6" />
<Mapping Codepoint="0115" Image="0115" HorzAdvance="8" />
<Mapping Codepoint="0116" Image="0116" HorzAdvance="6" />
<Mapping Codepoint="0117" Image="0117" HorzAdvance="10" />
<Mapping Codepoint="0118" Image="0118" HorzAdvance="8" />
<Mapping Codepoint="0119" Image="0119" HorzAdvance="12" />
<Mapping Codepoint="0120" Image="0120" HorzAdvance="8" />
<Mapping Codepoint="0121" Image="0121" HorzAdvance="8" />
<Mapping Codepoint="0122" Image="0122" HorzAdvance="8" />
<Mapping Codepoint="0123" Image="0123" HorzAdvance="6" />
<Mapping Codepoint="0124" Image="0124" HorzAdvance="6" />
<Mapping Codepoint="0125" Image="0125" HorzAdvance="6" />
<Mapping Codepoint="0126" Image="0126" HorzAdvance="10" />
</Font>

I have migrated the imageset from version 1 to version 2 using ceed-migrate.exe bundled with CEED. I have set the resource paths in the Project settings to point to the correct folders. However the font still doesn't appear to get loaded in CEED. In my 0.7 layout or any new layout I am unable to set any other font on my controls except DejaVuSans-10. The same font gets loaded in CELayoutEditor 0.7.1.

Also, the main reason I wanted to switch to CEED as soon as possible is because the bitmap font I am trying to use does not display properly:
Image
Image
I think from what I can see, the imageset for the font looks ok. Any idea why the font would display like that in the CELayoutEditor?

Many thanks!
Last edited by zadirion on Wed Feb 13, 2013 23:03, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: ceed-snapshot11 doesn't load pixmap fonts

Postby Kulik » Wed Feb 13, 2013 21:58

http://cegui.org.uk/mantis/view.php?id=769

Volunteers welcome.

I can't see the images (it requires me to login to Microsoft Live and I don't have an account there).

zadirion
Just popping in
Just popping in
Posts: 17
Joined: Sat May 07, 2011 14:38

Re: ceed-snapshot11 doesn't load pixmap fonts

Postby zadirion » Wed Feb 13, 2013 23:02

Hi there,

After some more investigation, I kinda figured it out.
In CEED, I needed to also add a font entry in the scheme to get the font to load. Once that was done, an error appeared mentioning it wasn't able to load the imageset due to its version being set to 'unknown'. That's because the old imageset format doesn't have a version attribute. So I used the converter to convert it to the new version and voilla, it worked. So no need to go through compat.

I noticed in CEED the overlapping glyph issue is fixed. I am using CEGUI 0.7.7 now in which the problem occurs, and looked in the release notes for 0.7.8 and 0.7.9 and found no mention of the fix. Will updating to 0.7.9 solve my issue? Or is the fix included in CEGUI 1.0 ?

zadirion
Just popping in
Just popping in
Posts: 17
Joined: Sat May 07, 2011 14:38

Re: ceed-snapshot11 doesn't load pixmap fonts

Postby zadirion » Thu Feb 14, 2013 05:34

Ok I have upgraded my project to use CEGUI 0.7.9 however the overlapping font glyph issue still persists.
Is there any way to get pixmap fonts to work properly?

Thanks

zadirion
Just popping in
Just popping in
Posts: 17
Joined: Sat May 07, 2011 14:38

Re: ceed-snapshot11 doesn't load pixmap fonts

Postby zadirion » Thu Feb 14, 2013 06:47

Ok i've debugged cegui to see what's happening.
The issue is not with CEGUI, I used Font studio to generate end export the font to cegui format. Apparently it writes a bad HorzAdvance attribute for the glyphs in the `.font` file. I think CEED ignored this attribute and used the code

Code: Select all

PixMapfont::DefineMapping():
float adv = (horz_advance == -1.0f) ?
        (float)(int)(image.getWidth() + image.getOffsetX()) : horz_advance;


to calculate the advancement.

So i deleted the HorzAdvance attribute from each mapping, however now the glyphs are spaced evenly, in a monospace fashion. Looks terrible. So this doesn't work either. What does CEED do to display this particular font properly?

zadirion
Just popping in
Just popping in
Posts: 17
Joined: Sat May 07, 2011 14:38

Re: ceed-snapshot11 doesn't load pixmap fonts

Postby zadirion » Fri Feb 15, 2013 07:43

Anyone any thoughts on this?

zadirion
Just popping in
Just popping in
Posts: 17
Joined: Sat May 07, 2011 14:38

Re: ceed-snapshot11 doesn't load pixmap fonts

Postby zadirion » Sat Feb 16, 2013 02:02

Meh, I bit the bullet and have rewritten the Font Studio's CEGUI exporter.
Relevant topic can be found here:
viewtopic.php?f=7&t=6367


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest