iced
iced copied to clipboard
Fonts: Character not displayed even though Font supports it
Is there an existing issue for this?
- [X] I have searched the existing issues.
Is this issue related to iced?
- [X] My hardware is compatible and my graphics drivers are up-to-date.
What happened?
I am writing a program for displaying the relationships between Kanji and related characters. For that, I want to display the character ⺮. I know that the font MS Gothic can display that character. That font consist of two font files:
- msgothic.ttc
- msgothic_0.ttc
I have imported them like this:
use iced::Font;
use array_concat::*;
const MS_GOTHIC_PART_1: [u8; 9176636] = *include_bytes!("../resources/fonts/msgothic.ttc");
const MS_GOTHIC_PART_2: [u8; 9165480] = *include_bytes!("../resources/fonts/msgothic_0.ttc");
const MS_GOTHIC: [u8; concat_arrays_size!(MS_GOTHIC_PART_1, MS_GOTHIC_PART_2)]
= concat_arrays!(MS_GOTHIC_PART_1, MS_GOTHIC_PART_2);
pub struct Fonts{
}
impl Fonts{
pub fn ms_gothic() -> Font {
Font::External{
name: "msgothic",
bytes: &MS_GOTHIC
}
}
[...]
This has worked nicely for all characters thus far. However, for ⺮ it only displays ☐ (the missing character symbol).
I suspect that this happens because the multi-file font support is not working as expected.
What is the expected behavior?
The character ⺮ should be displayed correctly.
Version
0.3.0
Operative System
Windows
Do you have any log output?
No response
This is not a bug, but a missing feature (see #33).
While the font is capable of displaying the character, the current text pipelines are not!
Fixed by #1697.