View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002546 | NoesisGUI | C# SDK | public | 2023-03-28 11:41 | 2023-03-29 13:20 |
| Reporter | sumel007 | Assigned To | sfernandez | ||
| Priority | normal | Severity | major | ||
| Status | resolved | Resolution | no change required | ||
| Product Version | 3.2.0 | ||||
| Target Version | 3.2.1 | Fixed in Version | 3.2.1 | ||
| Summary | 0002546: Font with "Condensed" in the name is not rendered properly | ||||
| Description | I use Roboto Condensed font (that's the actual name of the family). In 3.1.7 it worked properly, but in 3.2 it seems to go back to rendering the default font. I assume it's due to "Condensed" being in the name and the parser interpreting it as font family Roboto with condensed line spacing (which is not the case here). | ||||
| Platform | Any | ||||
|
After fixing 0002545 I tried the specified Roboto Condensed font and it works as expected, so I think your problems were related to the previous ticket. <TextBlock Text="Hello World" FontFamily="pack://application:,,,/Fonts/#Roboto Condensed"/> And in all cases the font selected was the correct one. Could you share the xaml you were using and the file structure (and providers) that were failing for you? |
|
|
I see now what is happening, in 3.2 we fully implemented the font differentiation algorithm used by WPF (0001868). This text will use "Roboto" + Condensed + Italic, which is "Roboto Condesed Italic" font: <TextBlock Text="Hello World" FontFamily="Fonts/#Roboto" FontStretch="Condensed" FontStyle="Italic"/> This text will use "Roboto Condensed" font, ignoring the Italic attribute: <TextBlock Text="Hello World" FontFamily="Fonts/#Roboto Condensed" FontStyle="Italic"/> This text will use "Roboto Condensed Italic" font: <TextBlock Text="Hello World" FontFamily="Fonts/#Roboto Condensed Italic"/> This text will use "Roboto Condensed Italic" font too, ignoring the Bold attribute: <TextBlock Text="Hello World" FontFamily="Fonts/#Roboto Condensed Italic" FontWeight="Bold"/> This text will use "Roboto Condensed Bold Italic" font: <TextBlock Text="Hello World" FontFamily="Fonts/#Roboto Condensed Bold Italic"/> Our recommedation is to use the plain family name "Roboto", and then specify the rest of styles as attributes. So you can define styles like this: <FontFamily x:Key="RobotoFont">../Fonts/#Roboto</FontFamily> |
|
|
Okay, I see now. Thanks for clarifying it. Yeah using Roboto as the font family name and then specifying weight, spacing etc. separately seems to work correctly. It was a little confusing, since the font is called "Roboto Condensed", which is why I was referencing it the way I originally was. But your solution seems to work fine. Thank you! |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-03-28 11:41 | sumel007 | New Issue | |
| 2023-03-28 12:04 | sfernandez | Assigned To | => sfernandez |
| 2023-03-28 12:04 | sfernandez | Status | new => assigned |
| 2023-03-28 12:04 | sfernandez | Target Version | => 3.2.1 |
| 2023-03-28 16:57 | sfernandez | Status | assigned => feedback |
| 2023-03-28 16:57 | sfernandez | Note Added: 0008373 | |
| 2023-03-29 09:09 | sumel007 | Status | feedback => assigned |
| 2023-03-29 12:25 | sfernandez | Status | assigned => feedback |
| 2023-03-29 12:25 | sfernandez | Note Added: 0008379 | |
| 2023-03-29 13:07 | sumel007 | Note Added: 0008383 | |
| 2023-03-29 13:07 | sumel007 | Status | feedback => assigned |
| 2023-03-29 13:20 | sfernandez | Status | assigned => resolved |
| 2023-03-29 13:20 | sfernandez | Resolution | open => no change required |
| 2023-03-29 13:20 | sfernandez | Fixed in Version | => 3.2.1 |