iced_aw icon indicating copy to clipboard operation
iced_aw copied to clipboard

icon text display issue

Open Cupnfish opened this issue 3 years ago • 5 comments

I used date_picker in my project, but those icons don't display correctly. Is the font file not configuring in Cargo.toml via git? 截屏2021-07-02 下午11 03 13

Cupnfish avatar Jul 02 '21 15:07 Cupnfish

Are you importing your own icon font? I recently had the same issue. My problem was that I have imported an other font under the same name as the icon font of iced_aw. The icons of iced_aw are named "Icons". If you import an other font under the same name they "collide" with each other.

pub const ICON_FONT: Font = Font::External {
    name: "Icons", // Use a different name here
    bytes: include_bytes!("../font/icons.ttf"),
};

Kaiden42 avatar Jul 02 '21 15:07 Kaiden42

Thank you very much, it solved my problem!

Cupnfish avatar Jul 02 '21 15:07 Cupnfish

I've reopened this issue as a reminder to rename the icon font of iced_aw to something more unique in the future. A more unique name would save a headache for the next person struggling with this issue.

Kaiden42 avatar Jul 02 '21 16:07 Kaiden42

Hi. I've got the same issue. I'm using tabbar (which uses icons) and date_picker. I'm not importing my own icons, but the date_picker has the buttons without icons as above. If I wanted to use the solution above, where do I make changes?

bobgates avatar Sep 28 '21 13:09 bobgates

If you are not importing your own icons and the icons are visible on the tabbar but not on the date_picker, this seems like a different kind of bug as there is no second icon font messing around with the one of iced_aw itself :thinking:

Kaiden42 avatar Sep 30 '21 20:09 Kaiden42

Thanks for leaving that open - had the same issue :). My font was called "ICONS" - was 1:1 the same than in the TODOS example. I wanted to switch to SVG icons anwyays.

mkrueger avatar Nov 17 '22 21:11 mkrueger

this is no longer relevant on how iced uses fonts.

genusistimelord avatar Aug 04 '23 15:08 genusistimelord