Cannot show character "⌀” (U+2300:DIAMETER SIGN)
Hi,
I cannot use Noesis to show the character "⌀” (U+2300:DIAMETER SIGN).
I am setting the font to Segoe UI Symbol. Is it a known issue or is there something wrong with my code ?
Thanks.
I cannot use Noesis to show the character "⌀” (U+2300:DIAMETER SIGN).
I am setting the font to Segoe UI Symbol. Is it a known issue or is there something wrong with my code ?
Thanks.
Re: Cannot show character "⌀” (U+2300:DIAMETER SIGN)
Hi, does it work for you in a minimal example?
I've done this xamltoy rn and it works out of the box. Either on Label and TextBlock, btw.
I've done this xamltoy rn and it works out of the box. Either on Label and TextBlock, btw.
Code: Select all
<StackPanel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextBlock FontSize="100">⌀</TextBlock>
<Label FontSize="100">⌀</Label>
</StackPanel>-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Cannot show character "⌀” (U+2300:DIAMETER SIGN)
How are you setting the character, in xaml or in code?
And the FontFamily?
And the FontFamily?
Re: Cannot show character "⌀” (U+2300:DIAMETER SIGN)
Hi Sergio, Ricardo,
Thanks for the reply. I am trying to use "Segoe UI Symbol" to show the character. It happens both when I set the character in XAML and from code (through binding).
Debugging the issue, I found that it happen if my application register "Segoe UI" font before "Segoe UI Symbol".
In that case the CachedFontProvider::FamilyExists returns true for "Segoe UI Symbol" and it doesn't get registered properly.
In the below code:
familyName is "Segoe UI Symbol"
family.key is "Segoe UI"
that makes StrCaseStartsWith(familyName, family.key.Str())) evaluates to true.
I think it shouldn't be true for the relation of "Segoe UI" and "Segoe UI Symbol" because they are considered different font family.
Thanks for the reply. I am trying to use "Segoe UI Symbol" to show the character. It happens both when I set the character in XAML and from code (through binding).
Debugging the issue, I found that it happen if my application register "Segoe UI" font before "Segoe UI Symbol".
In that case the CachedFontProvider::FamilyExists returns true for "Segoe UI Symbol" and it doesn't get registered properly.
In the below code:
familyName is "Segoe UI Symbol"
family.key is "Segoe UI"
that makes StrCaseStartsWith(familyName, family.key.Str())) evaluates to true.
I think it shouldn't be true for the relation of "Segoe UI" and "Segoe UI Symbol" because they are considered different font family.
Code: Select all
bool CachedFontProvider::FamilyExists(const Uri& baseUri, const char* familyName)
{
Uri folder;
NormalizeFolder(baseUri, folder);
Families& families = GetFolder(folder);
Families::Iterator it = families.Find(familyName);
if (it != families.End())
{
return true;
}
else
{
for (Families::Bucket& family : families)
{
if (StrCaseStartsWith(familyName, family.key.Str()))
{
return true;
}
}
}
return false;
}
Re: Cannot show character "⌀” (U+2300:DIAMETER SIGN)
I am pretty sure it is a bug so I created an issue here with a patch to reproduce it: https://www.noesisengine.com/bugs/view.php?id=3492
Thanks.
Thanks.
Re: Cannot show character "⌀” (U+2300:DIAMETER SIGN)
Thanks Niko, this is definitely a bug.
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 5 guests