Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fonts: Character not displayed even though Font supports it #1295

Closed
2 tasks done
KiraResari opened this issue Mar 26, 2022 · 2 comments
Closed
2 tasks done

Fonts: Character not displayed even though Font supports it #1295

KiraResari opened this issue Mar 26, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@KiraResari
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • 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

@KiraResari KiraResari added the bug Something isn't working label Mar 26, 2022
@hecrj
Copy link
Member

hecrj commented Apr 5, 2022

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!

@hecrj
Copy link
Member

hecrj commented Jun 20, 2023

Fixed by #1697.

@hecrj hecrj closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants