Logrus
Topic Author
Posts: 52
Joined: 22 Jul 2015, 12:16

Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

10 Jan 2023, 12:39

Hi
I use *.ttf for icons
in 3.2.0b1 glyphs with a specific unicode are not displayed,
for example, if the glyph is set to unicode 0x0482, it is displayed, and if 0x0483, then it is not visible

in version 3.1.6, all glyphs are visible
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

10 Jan 2023, 13:30

Could you please paste the full XAML here?
 
Logrus
Topic Author
Posts: 52
Joined: 22 Jul 2015, 12:16

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

10 Jan 2023, 15:58

<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Grid.Resources>
        <FontFamily x:Key="Font.Icons">Fonts/#Icons</FontFamily>
    </Grid.Resources>

    <TextBlock
        Margin="10,100,0,0"
        FontFamily="{StaticResource Font.Icons}"
        FontSize="120"
        TextWrapping="Wrap">
        &#x0483;&#x0482;
    </TextBlock>
</Grid>
Attachments
TestIcons.zip
(1.24 KiB) Downloaded 51 times
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

11 Jan 2023, 20:51

I am not sure if that font is well formed.

First, the character U+483 is an extend Cyrillic codepoint (so in your XAML there is only one grapheme).

Second, by the tables of that font, the U+483 is shaped with a horizontal displacement of -707 units and an empty advance.

I have been analyzing this with the hb-shape tool available in HarfBuzz and the information reported is similar to what Noesis renders.

Did you create this font or was it downloaded from somewhere?
 
Logrus
Topic Author
Posts: 52
Joined: 22 Jul 2015, 12:16

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

11 Jan 2023, 21:34

I created a font for this test in online editor - FontEditor
https://www.fonteditor.fun/fonteditor/index-en.html

TestIcons.xaml in XamlPlayer(3.1.6) outputs 2 glyphs and XamlPlayer (3.2.0) outputs 1 glyph.
in order for XamlPlayer(3.2.0) to display 2 glyphs,
it is enough to assign another unicode to the glyph in the font, for example (0x0481, 0x0492)

After porting to 3.2.0 from version 3.1.6, some icons are not displayed in my application. Only the unicode value is affected.

I assigned unicode in order and it worked as expected in 3.1.6.

3.2.0 handles the unicode value more strictly?
 
Logrus
Topic Author
Posts: 52
Joined: 22 Jul 2015, 12:16

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

12 Jan 2023, 10:03

Mark Nonspacing.png

If unicode is (Mark nonspacing - Mn), then it cannot be used for Icon in Noesis 3.2
https://www.compart.com/en/unicode/category/Mn#UNC_CAT
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

12 Jan 2023, 11:00

3.2.0 handles the unicode value more strictly?
Yes, we are now more compatible with Unicode. In 3.2 we implemented a new Shaping algorithm with support for complex scripts, RTL languages, emoji sequences, ligatures, mark positioning...

The U+0048x space doesn't seem to be a good one for storing general symbols.
 
dmacd10
Posts: 11
Joined: 01 Apr 2021, 01:34

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

28 Apr 2023, 04:01

I just hit a possibly similar issue when upgrading from 3.1.7 to 3.2.0 in Unity.

I was using FontAwesome 5 for standard buttons on a video player e.g:
                <Button
                    Click="Video_PlayClicked"
                    Margin="5"
                    Visibility="{Binding SessionVM.VideoPlayerVM.IsPaused, Converter={StaticResource BoolToVisibilityConverter}}"
                    x:Name="playButton">

                    <TextBlock
                        FontFamily="Fonts/FontAwesome/#Font Awesome 5 Free"
                        FontSize="20"
                        Foreground="White"
                        Text="&#xf04b;" />
                </Button>
This renders fine on 3.17 but gets a box-with-X symbol on 3.2.0. The font is being imported and Noesis reports no errors or warnings.

Can we no longer reliably use fonts for icons this way?
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

28 Apr 2023, 10:58

Can we no longer reliably use fonts for icons this way?
Noesis 3.2 is more Unicode conformant than before.

Is your XAML working correctly on Blend/WPF ?
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed

28 Apr 2023, 11:00

Also, could you please share the .ttf you are using?

Who is online

Users browsing this forum: No registered users and 89 guests