-
Notifications
You must be signed in to change notification settings - Fork 103
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
Avoid reserved Codepoints U+FE00...U+FE0F and U+FE20...U+FE2F #568
Comments
stephenquan
changed the title
Icons not generated for the 16 codepoints 0xfe00 - 0xfe0f
Avoid Variation Codepoints U+FE00 - U+FE0F
Jun 4, 2024
stephenquan
changed the title
Avoid Variation Codepoints U+FE00 - U+FE0F
Avoid reserved Codepoints U+FE00...U+FE0F and U+FE20...U+FE2F
Jun 4, 2024
Workaround, insert into the codepoints dictionary object reservation for the affected codepoints, e.g. module.exports = {
name: 'my-icons',
fontHeight: 500,
normalize: true,
inputDir: './icons',
outputDir: './dist',
fontTypes: ['ttf'],
assetTypes: ['css', 'json', 'html'],
formatOptions: {
json: {
indent: 2
}
},
codepoints: {
// U+FE00...U+FE0F Variation Selectors - see https://codepoints.net/variation_selectors
'variable-selector-00': 0xfe00,
'variable-selector-01': 0xfe01,
'variable-selector-02': 0xfe02,
'variable-selector-03': 0xfe03,
'variable-selector-04': 0xfe04,
'variable-selector-05': 0xfe05,
'variable-selector-06': 0xfe06,
'variable-selector-07': 0xfe07,
'variable-selector-08': 0xfe08,
'variable-selector-09': 0xfe09,
'variable-selector-0a': 0xfe0a,
'variable-selector-0b': 0xfe0b,
'variable-selector-0c': 0xfe0c,
'variable-selector-0d': 0xfe0d,
'variable-selector-0e': 0xfe0e,
'variable-selector-0f': 0xfe0f,
// U+FE20...U+FE2F Combining Half Marks - see https://codepoints.net/combining_half_marks
'combining-half-marks-00': 0xfe20,
'combining-half-marks-01': 0xfe21,
'combining-half-marks-02': 0xfe22,
'combining-half-marks-03': 0xfe23,
'combining-half-marks-04': 0xfe24,
'combining-half-marks-05': 0xfe25,
'combining-half-marks-06': 0xfe26,
'combining-half-marks-07': 0xfe27,
'combining-half-marks-08': 0xfe28,
'combining-half-marks-09': 0xfe29,
'combining-half-marks-0a': 0xfe2a,
'combining-half-marks-0b': 0xfe2b,
'combining-half-marks-0c': 0xfe2c,
'combining-half-marks-0d': 0xfe2d,
'combining-half-marks-0e': 0xfe2e,
'combining-half-marks-0f': 0xfe2f,
},
getIconId: ({
basename,
relativeDirPath,
absoluteFilePath,
relativeFilePath,
index
}) => {
return basename;
}
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following codepoints are reserved and should be avoided:
In my project I have 3380 SVGs icons. I am not explicitly setting codepoints. Codepoints U+F101 (DEFAULT_START_CODEPOINT) ... U+FE3F are automatically allocated by fantasticon. However, these codepoints collide with the reserved codepoints and create rendering issues.
Here's a repro
makeicons.sh
script:dist/my-icons.html
below shows that icons in U+FE00...U+FE0F are blank and icons in the U+FE20...U+FE2F` are not centered but left jusitifed.If #527 was implemented, it could help dodge the problematic codepoints.
The text was updated successfully, but these errors were encountered: