oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.45k stars 2.12k forks source link

MDI 4.9.95: Issue Accessing F0000+ Address Range Icons #1136

Open MutableLoss opened 4 years ago

MutableLoss commented 4 years ago

Environment

OSX 10.15/Xcode 11 Testing on iOS 13.3

Description

I have been attempting to use the ideogram icons, and have been attempting to manually upgrade the MaterialCommunityIcons to version 4.9.95 to gain access to the new fonts. While it works to an extent, any icon accessed that is placed above the SSP set address (F0000+), shows a character outside the MDI set. After some testing out a few different addresses, this range seems to be accessing the System and CJK Fonts (shapes, Chinese, Japanese, Korean characters). All other icons mapped with lesser values, work without issue.

A few examples of fonts showing this behavior:

'ideogram-cjk': F035C 'ideogram-cjk-variant': F035D 'coffee-to-go-outline': F0339 'file-multiple-outline': F0054

I tried two completely different methods to make sure it wasn't a font set issue:

Both scenarios yielded the same results. Can anyone explain what the cause of this conflict is?

Demo

ideogram-cjk:

cjk

file-multiple-outline:

file-outline
giannismacheras commented 4 years ago

This has happened to me as well with coin-outline and dice-multiple-outline.

dimbslmh commented 4 years ago

Breaking Changes in MDI v5.0.45 https://github.com/Templarian/MaterialDesign/issues/4901

Codepoint Remapping

The codepoints in all font files are being remapped to move our icons into a Private Use Area of Unicode, starting at F0001

@oblador Starting from MDI v5.0.45, all mdi icons won't work with String.fromCharCode.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode

The static String.fromCharCode() method returns a string created from the specified sequence of UTF-16 code units.

The range is between 0 and 65535 (0xFFFF). Numbers greater than 0xFFFF are truncated. No validity checks are performed.