- 
                Notifications
    
You must be signed in to change notification settings  - Fork 23
 
Description
Suppose I have a big font file (TTF file). I use this one by Mozilla:
https://github.com/mozilla/twemoji-colr/releases
I know I will need to use only a small subset of it, that's responsible of countries flags.
Not sure how country flags work in Unicode, but according to what I've found I think it's somehow from 0x1F1E6 to 0x1F1FF, and that the countries are just 2 of those combined. I don't know where are the results and how they are drawn. To me it seems that as 0x1F1E6 to 0x1F1FF are exactly a-z letters, it has to exist somewhere to show the countries flags themselves. Sadly I couldn't find a tool to show where those are.
So for now I've assumed something that I think is wrong, that I only need this range of glyphs.
Is there a way to make it smaller by removing the parts that I won't use, using this tool?
I thought maybe the command that was written in the main page could help me:
glyphhanger --subset=*.ttf
Not sure what it does, but I was hoping that maybe it makes multiple TTF files out of a TTF file that I provide, one for each glyphs groups, or something like that.
But before I even try, I need to install this tool...
I tried to use this command (used this tool):
npm install -g glyphhanger
But then I got these errors:
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated domexception@1.0.1: Use your platform's native DOMException instead
npm warn deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm warn deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated puppeteer@12.0.1: < 22.8.2 is no longer supported
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\User\\Desktop\\node-v20.17.0-win-x64\\node_modules\\glyphhanger\\node_modules',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\User\Desktop\node-v20.17.0-win-x64\node_modules\glyphhanger\node_modules\jsdom\lib'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\User\\Desktop\\node-v20.17.0-win-x64\\node_modules\\glyphhanger\\node_modules\\jsdom\\lib'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     'C:\\Users\\User\\Desktop\\node-v20.17.0-win-x64\\node_modules\\glyphhanger',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\User\Desktop\node-v20.17.0-win-x64\node_modules\glyphhanger\node_modules\jsdom'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\\Users\\User\\Desktop\\node-v20.17.0-win-x64\\node_modules\\glyphhanger\\node_modules\\jsdom'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path C:\Users\User\Desktop\node-v20.17.0-win-x64\node_modules\glyphhanger\node_modules\puppeteer
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm error 'node' is not recognized as an internal or external command,
npm error operable program or batch file.
npm error A complete log of this run can be found in: C:\Users\User\AppData\Local\npm-cache\_logs\2024-09-07T21_42_17_598Z-debug-0.log
What should I do?