Page 1 of 2
Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 10 Jan 2023, 12:39
by Logrus
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
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 10 Jan 2023, 13:30
by jsantos
Could you please paste the full XAML here?
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 10 Jan 2023, 15:58
by Logrus
<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">
҃҂
</TextBlock>
</Grid>
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 11 Jan 2023, 20:51
by jsantos
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?
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 11 Jan 2023, 21:34
by Logrus
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?
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 12 Jan 2023, 10:03
by Logrus
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
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 12 Jan 2023, 11:00
by jsantos
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.
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 28 Apr 2023, 04:01
by dmacd10
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="" />
</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?
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 28 Apr 2023, 10:58
by jsantos
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 ?
Re: Noesis 3.2.0b1 TextBlock Some glyphs are not displayed
Posted: 28 Apr 2023, 11:00
by sfernandez
Also, could you please share the .ttf you are using?