andreinitescu / IconFont2Code

Generate C# class with constant fields for the icons in your font
277 stars 37 forks source link

[Code Generation] Wrong literals for glyphs from upper bit planes. #9

Closed CarnageMarkus closed 4 years ago

CarnageMarkus commented 4 years ago

Some characters doesn't work because code is not generated properly for C#.

https://stackoverflow.com/questions/31690885/unicode-special-character-not-displaying-in-label

The \u escape takes only 4 hex digits

Trying to use \u0001F6B5 will result in multiple wrong characters Proper code should be \U0001F6B5 for codes longer than 4 hex digits

andreinitescu commented 4 years ago

Which font are you using? I need to know in order to test and fix the issue. Thanks.

andreinitescu commented 4 years ago

@CarnageMarkus Should be fixed now. Could you please confirm it works for you too? Thanks

CarnageMarkus commented 4 years ago

I was using Material Design Icons, I will let you know in a minute.

CarnageMarkus commented 4 years ago

Everything works. Thanks. :)

andreinitescu commented 4 years ago

@CarnageMarkus Great, thanks for raising the issue.

matt-goldman commented 3 years ago

Hi @andreinitescu - I've noticed since this change all characters are displayed with upper bit plane formatting for this particular font (Material Design Icons).

iconfontscreen
andreinitescu commented 3 years ago

@matt-goldman So what's the issue? Does the icons get displayed in your app?

matt-goldman commented 3 years ago

@matt-goldman So what's the issue? Does the icons get displayed in your app?

The icons don't display in my app using these codes, no. If I use the lower bit plane codes produced by your previous version, they work. I think this font uses a combination of both.

matt-goldman commented 3 years ago

@andreinitescu have you had a chance to look at this yet, were you able to reproduce this issue?

matt-goldman commented 3 years ago

One last comment on this - looks like the latest version of this font does in fact encode all of the characters with upper bitplane codes. So it's not a bug in your code, just a change in the way this font is organized.