Font Ranges for languages

408 views
asked Jun 18, 2018 in GUI Development by itPenguin

Hello,

I had a look at some language examples, but I have no idea, how this is supposed to work.

First:
If all font names and ranges are identical, I still get a lot of these warnings:

[18.6.2018 19:42:45] Warning Application::Futura_Light_19pt_08.Ranges.Spanisch : The glyph range specified in the language variant 'Spanisch' of the font resource 'Application::Futura_Light_19pt_08' overlaps with the ranges from other language variants. The resulting font resource, however, can contain only one glyph for one character code. This can result in text being rendered incorrectly. Please review the 'Ranges' attribute of the font resource 'Application::Futura_Light_19pt_08'.


Why do I need different font ranges for german and english?

Second:
At least my russian font will be different. How can I influence the font range? For sure there will be symbols in the fonts, that use the same code. So I can't use the symbols?

Third:
What's the use of the file FontRange.txt, which is created by the xls macro? For which of the languages is it? Isn't it neccessary to create such a file for each language?

Fourth:
Using Fontrange.txt creates this error message:

[18.6.2018 19:54:54] Error Application::Futura_Light_19pt_08.Ranges.English : Missing character ranges in the font resource 'Application::Futura_Light_19pt_08'. Embedded Wizard expects here a list of character codes, which should be taken over during the resource conversion (e.g. 'A'-'Z'). Alternatively a path referring to a file containing the character ranges can be used here (e.g. .\codes.txt).

1 Answer

0 votes
answered Jun 19, 2018 by Manfred Schweyer

Hello,

first of all, let me refer to the chapter 'Localize a font resource', which describes the basics about multilingual font resources. Nevertheless, let me try to answer your questions:

First: There is no need to define the font ranges for every language! Just use the font range of the default language. The idea of different font ranges / font names for a dedicated language is, that you can create one virtual font based on different TrueType fonts. This means, for example you can use default font range 0x20-0xFF from one TrueType font and add the Cyrillic character range from another TrueType font and combine them within one font resource. As a result, all text views using that font resource can display Latin and Cyrillic strings without the need to change the font during runtime!

Second: Just add the necessary charcter range to the Russian language variant of the attribute Ranges.

Third: The FontRange.txt file, that is created by the Excel template can be used for the 'default' font range. The macro combines all character codes of all languages into one range. Please have a look into the example StringTable that is installed with Embedded Wizard Studio. The macro does not generate separate ranges for every language (which is not useful in most cases).

Fourth: Can you compare your implementation with the example 'StringTable' - maybe there is some error within your FontRanges.txt file.

Best regards,

Manfred.

 

commented Jun 20, 2018 by itPenguin

OK, this here seems quite similiar to the example:

But still I see this error message:

[20.6.2018 10:02:10] Error Application::Futura_Medium_32pt.FontName.English : Missing font name in the font resource 'Application::Futura_Medium_32pt'. Embedded Wizard expects here a name of a TrueType font, which is available on this MS-Windows system (e.g. 'Arial'). This font will be then converted.
[20.6.2018 10:02:10] Error Hauptfenster::DialogGross.TextHeadline.Font (1:1) : Unknown definition 'Application::Futura_Medium_32pt' found.

When I insert the fonts, then there are arrors regarding the font ranges:

[20.6.2018 10:09:10] Error Application::Futura_Medium_32pt.Ranges.English : Missing character ranges in the font resource 'Application::Futura_Medium_32pt'. Embedded Wizard expects here a list of character codes, which should be taken over during the resource conversion (e.g. 'A'-'Z'). Alternatively a path referring to a file containing the character ranges can be used here (e.g. .\codes.txt).
[20.6.2018 10:09:10] Error Hauptfenster::DialogGross.TextHeadline.Font (1:1) : Unknown definition 'Application::Futura_Medium_32pt' found.

Inserting these causes lots of warnings:

[20.6.2018 10:11:06] Warning Application::Futura_Medium_32pt.Ranges.English : The glyph range specified in the language variant 'English' of the font resource 'Application::Futura_Medium_32pt' overlaps with the ranges from other language variants. The resulting font resource, however, can contain only one glyph for one character code. This can result in text being rendered incorrectly. Please review the 'Ranges' attribute of the font resource 'Application::Futura_Medium_32pt'.
[20.6.2018 10:11:06] Warning Application::Futura_Medium_32pt.Ranges.Franzoesisch : The glyph range specified in the language variant 'Franzoesisch' of the font resource 'Application::Futura_Medium_32pt' overlaps with the ranges from other language variants. The resulting font resource, however, can contain only one glyph for one character code. This can result in text being rendered incorrectly. Please review the 'Ranges' attribute of the font resource 'Application::Futura_Medium_32pt'.
[20.6.2018 10:11:06] Warning Application::Futura_Medium_32pt.Ranges.Niederlaendisch : The glyph range specified in the language variant 'Niederlaendisch' of the font resource 'Application::Futura_Medium_32pt' overlaps with the ranges from other language variants. The resulting font resource, however, can contain only one glyph for one character code. This can result in text being rendered incorrectly. Please review the 'Ranges' attribute of the font resource 'Application::Futura_Medium_32pt'.
[20.6.2018 10:11:06] Warning Application::Futura_Medium_32pt.Ranges.Polnisch : The glyph range specified in the language variant 'Polnisch' of the font resource 'Application::Futura_Medium_32pt' overlaps with the ranges from other language variants. The resulting font resource, however, can contain only one glyph for one character code. This can result in text being rendered incorrectly. Please review the 'Ranges' attribute of the font resource 'Application::Futura_Medium_32pt'.
[20.6.2018 10:11:06] Warning Application::Futura_Medium_32pt.Ranges.Spanisch : The glyph range specified in the language variant 'Spanisch' of the font resource 'Application::Futura_Medium_32pt' overlaps with the ranges from other language variants. The resulting font resource, however, can contain only one glyph for one character code. This can result in text being rendered incorrectly. Please review the 'Ranges' attribute of the font resource 'Application::Futura_Medium_32pt'.

commented Jun 20, 2018 by itPenguin

Ok, it seems EW causes the error when stroing the font.ewui:

After removing a language in the ewui this line appears:

    English = ;

Delting this line manually solves the issue;

commented Jun 20, 2018 by Manfred Schweyer

Hello,

no, Embedded Wizard is not causing the error - the error is caused by the empty attributes.

If you want to restore the origin value of an attribute or a property, it is not sufficient to delete the content - in this case it is still defined, but with an empty content. Please do not modify the *.ewu files.

In order to solve the conflict, you have to explicitely restore the default or inherited value.

You can see that within the attributes and properties area within Inspector window: If an attribute or property is modified, it is written bold, if it is the original value, it is written regular.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...