openmaptiles / fonts Goto Github PK
View Code? Open in Web Editor NEWFont glyphs for GL Styles with open fonts
Home Page: https://fonts.openmaptiles.org/
Font glyphs for GL Styles with open fonts
Home Page: https://fonts.openmaptiles.org/
Check openmaptiles/genfontgl#6
root@vmi1046457:~# git clone https://github.com/openmaptiles/fonts.git
Cloning into 'fonts'...
remote: Enumerating objects: 8699, done.
remote: Counting objects: 100% (321/321), done.
remote: Compressing objects: 100% (281/281), done.
remote: Total 8699 (delta 51), reused 40 (delta 40), pack-reused 8378
Receiving objects: 100% (8699/8699), 149.06 MiB | 23.49 MiB/s, done.
Resolving deltas: 100% (121/121), done.
root@vmi1046457:~# cd fonts/
root@vmi1046457:~/fonts# ls -lah
total 52K
drwxr-xr-x 8 root root 4.0K Mar 22 17:04 .
drwx------ 12 root root 4.0K Mar 22 17:03 ..
drwxr-xr-x 8 root root 4.0K Mar 22 17:04 .git
-rw-r--r-- 1 root root 21 Mar 22 17:04 .gitignore
-rw-r--r-- 1 root root 1.4K Mar 22 17:04 README.md
-rw-r--r-- 1 root root 4.2K Mar 22 17:04 generate.js
drwxr-xr-x 2 root root 4.0K Mar 22 17:04 metropolis
drwxr-xr-x 2 root root 4.0K Mar 22 17:04 noto-sans
drwxr-xr-x 2 root root 4.0K Mar 22 17:04 open-sans
-rw-r--r-- 1 root root 216 Mar 22 17:04 package.json
drwxr-xr-x 2 root root 4.0K Mar 22 17:04 pt-sans
drwxr-xr-x 2 root root 4.0K Mar 22 17:04 roboto
root@vmi1046457:~/fonts# npm install
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /root/fonts/node_modules/fontnik
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build=true
npm ERR! make: Entering directory '/root/fonts/node_modules/fontnik/build'
npm ERR! ACTION binding_gyp_action_before_build_target_install_deps mason_packages
npm ERR! Downloading https://s3.amazonaws.com/mason-binaries/linux-x86_64/clang++/10.0.0.tar.gz
npm ERR! TOUCH Release/obj.target/action_before_build.stamp
npm ERR! CXX(target) Release/obj.target/fontnik/src/node_fontnik.o
npm ERR! make: Leaving directory '/root/fonts/node_modules/fontnik/build'
npm ERR! Failed to execute '/root/.nvm/versions/node/v18.15.0/bin/node /root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build=true --module=/root/fonts/node_modules/fontnik/lib/binding/fontnik.node --module_name=fontnik --module_path=/root/fonts/node_modules/fontnik/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/root/fonts/node_modules/fontnik/lib/binding/fontnik.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v108 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v108-linux-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/fonts/node_modules/fontnik/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/fonts/node_modules/fontnik/common.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.15.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.15.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.15.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/root/fonts/node_modules/fontnik',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! basename: missing operand
npm ERR! Try 'basename --help' for more information.
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/boost/1.67.0.tar.gz
npm ERR! * Installed binary package at /root/fonts/node_modules/fontnik/mason_packages/headers/boost/1.67.0
npm ERR! basename: missing operand
npm ERR! Try 'basename --help' for more information.
npm ERR! * Linking /root/fonts/node_modules/fontnik/mason_packages/headers/boost/1.67.0
npm ERR! * Links will be inside /root/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /root/fonts/node_modules/fontnik/mason_packages/headers/boost/1.67.0
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/linux-x86_64/freetype/2.7.1.tar.gz
npm ERR! * Installed binary package at /root/fonts/node_modules/fontnik/mason_packages/linux-x86_64/freetype/2.7.1
npm ERR! * Linking /root/fonts/node_modules/fontnik/mason_packages/linux-x86_64/freetype/2.7.1
npm ERR! * Links will be inside /root/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /root/fonts/node_modules/fontnik/mason_packages/linux-x86_64/freetype/2.7.1
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/protozero/1.6.8.tar.gz
npm ERR! * Installed binary package at /root/fonts/node_modules/fontnik/mason_packages/headers/protozero/1.6.8
npm ERR! * Linking /root/fonts/node_modules/fontnik/mason_packages/headers/protozero/1.6.8
npm ERR! * Links will be inside /root/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /root/fonts/node_modules/fontnik/mason_packages/headers/protozero/1.6.8
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/sdf-glyph-foundry/0.1.1.tar.gz
npm ERR! * Installed binary package at /root/fonts/node_modules/fontnik/mason_packages/headers/sdf-glyph-foundry/0.1.1
npm ERR! * Linking /root/fonts/node_modules/fontnik/mason_packages/headers/sdf-glyph-foundry/0.1.1
npm ERR! * Links will be inside /root/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /root/fonts/node_modules/fontnik/mason_packages/headers/sdf-glyph-foundry/0.1.1
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/gzip-hpp/0.1.0.tar.gz
npm ERR! * Installed binary package at /root/fonts/node_modules/fontnik/mason_packages/headers/gzip-hpp/0.1.0
npm ERR! * Linking /root/fonts/node_modules/fontnik/mason_packages/headers/gzip-hpp/0.1.0
npm ERR! * Links will be inside /root/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /root/fonts/node_modules/fontnik/mason_packages/headers/gzip-hpp/0.1.0
npm ERR! <command-line>: error: "_GLIBCXX_USE_CXX11_ABI" redefined
npm ERR! <command-line>: note: this is the location of the previous definition
npm ERR! make: *** [fontnik.target.mk:156: Release/obj.target/fontnik/src/node_fontnik.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.15.0-53-generic
npm ERR! gyp ERR! command "/root/.nvm/versions/node/v18.15.0/bin/node" "/root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build=true" "--module=/root/fonts/node_modules/fontnik/lib/binding/fontnik.node" "--module_name=fontnik" "--module_path=/root/fonts/node_modules/fontnik/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd /root/fonts/node_modules/fontnik
npm ERR! gyp ERR! node -v v18.15.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/root/.nvm/versions/node/v18.15.0/bin/node /root/.nvm/versions/node/v18.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build=true --module=/root/fonts/node_modules/fontnik/lib/binding/fontnik.node --module_name=fontnik --module_path=/root/fonts/node_modules/fontnik/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/root/fonts/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 5.15.0-53-generic
npm ERR! node-pre-gyp ERR! command "/root/.nvm/versions/node/v18.15.0/bin/node" "/root/fonts/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=true"
npm ERR! node-pre-gyp ERR! cwd /root/fonts/node_modules/fontnik
npm ERR! node-pre-gyp ERR! node -v v18.15.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-03-22T16_05_23_416Z-debug-0.log
root@vmi1046457:~/fonts# nano package.json
root@vmi1046457:~/fonts#
node : v18.15.0
O.S. : Ubuntu 22.04
The Highway Gothic font is used in United States highway signs and route shields. Support for this font would allow for US-centric maps to display highway shields and other highway-related features using the same type face used in the real world.
There are 8 variants of Highway Gothic, including: "A" (the narrowest), "B", "C", "D", "E", "E(M)" (a modified version of "E" with wider strokes), and "F".
These fonts are in the public domain (as US government works) and have been recreated in a few places, including:
https://github.com/sammdot/roadgeek-fonts.
Using Mapbox GL JS, and modifying the style (osm-bright-gl-style) to this:
"glyphs": "mapbox://fonts/openmaptiles/{fontstack}/{range}.pbf"
results in a 404 not found error.
So the README might be wrong?
When I add to my style:
'glyphs': 'https://free.tilehosting.com/fonts/{fontstack}/{range}.pbf',
I get error in the browser console:
mutation loadMap @ 14:26:40.179
:8089/#7.3/50.055/14.001:1 Failed to load https://free.tilehosting.com/fonts/Noto%20Sans%20Regular/0-255.pbf: Redirect from 'https://free.tilehosting.com/fonts/Noto%20Sans%20Regular/0-255.pbf' to 'https://openmaptiles.com/hosting/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8089' is therefore not allowed access.
When I add to my style:
'glyphs': 'https://free.tilehosting.com/fonts/{fontstack}/{range}.pbf?key={mySecretKey}',
the error is gone, but when changing fonts in the style just Open Sans is 'available/ shows'.
I'm trying to use the Positron style in an offline map and therefore host fonts and style myself with a local http server.
Using a simple server like http-server to host the font files generated by this project seems to be limited to work with styles that contain only a single font family. With the Positron style, the url {fontstack}/{range}.pbf
of the glyphs
property gets replaced with Metropolis%20Regular,Noto%20Sans%20Regular/0-255.pbf
and fails. And according to the Mapbox documentation {fontstack} is replaced with a comma-separated list.
The Maptiler seems to have this implemented: https://api.maptiler.com/fonts/Metropolis%20Regular,Noto%20Sans%20Regular/0-255.pbf?key={key}
Is there a solution available to this problem? How to translate the output folder of this project to such an API request? What is the expected result by the API?
Thanks.
Hi All,
I cloned the repo and did npm install
, getting tons of error for it:
npm install
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build=true
npm ERR! make: Entering directory '/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/build'
npm ERR! ACTION binding_gyp_action_before_build_target_install_deps mason_packages
npm ERR! Downloading https://s3.amazonaws.com/mason-binaries/linux-x86_64/clang++/10.0.0.tar.gz
npm ERR! TOUCH Release/obj.target/action_before_build.stamp
npm ERR! CXX(target) Release/obj.target/fontnik/src/node_fontnik.o
npm ERR! make: Leaving directory '/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/build'
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build=true --module=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding/fontnik.node --module_name=fontnik --module_path=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding/fontnik.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.6.0/Release/node-v93-linux-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/common.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/anurag/.cache/node-gyp/16.13.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/anurag/.cache/node-gyp/16.13.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/anurag/.cache/node-gyp/16.13.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! basename: missing operand
npm ERR! Try 'basename --help' for more information.
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/boost/1.67.0.tar.gz
npm ERR! * Installed binary package at /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/boost/1.67.0
npm ERR! basename: missing operand
npm ERR! Try 'basename --help' for more information.
npm ERR! * Linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/boost/1.67.0
npm ERR! * Links will be inside /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/boost/1.67.0
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/linux-x86_64/freetype/2.7.1.tar.gz
npm ERR! * Installed binary package at /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/linux-x86_64/freetype/2.7.1
npm ERR! * Linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/linux-x86_64/freetype/2.7.1
npm ERR! * Links will be inside /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/linux-x86_64/freetype/2.7.1
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/protozero/1.6.8.tar.gz
npm ERR! * Installed binary package at /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/protozero/1.6.8
npm ERR! * Linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/protozero/1.6.8
npm ERR! * Links will be inside /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/protozero/1.6.8
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/sdf-glyph-foundry/0.1.1.tar.gz
npm ERR! * Installed binary package at /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/sdf-glyph-foundry/0.1.1
npm ERR! * Linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/sdf-glyph-foundry/0.1.1
npm ERR! * Links will be inside /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/sdf-glyph-foundry/0.1.1
npm ERR! * Downloading binary package https://mason-binaries.s3.amazonaws.com/headers/gzip-hpp/0.1.0.tar.gz
npm ERR! * Installed binary package at /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/gzip-hpp/0.1.0
npm ERR! * Linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/gzip-hpp/0.1.0
npm ERR! * Links will be inside /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/.link/
npm ERR! * Using 'cp' for symlinking
npm ERR! * Done linking /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/mason_packages/headers/gzip-hpp/0.1.0
npm ERR! <command-line>: error: "_GLIBCXX_USE_CXX11_ABI" redefined
npm ERR! <command-line>: note: this is the location of the previous definition
npm ERR! make: *** [fontnik.target.mk:156: Release/obj.target/fontnik/src/node_fontnik.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.0.0-38-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build=true" "--module=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding/fontnik.node" "--module_name=fontnik" "--module_path=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build=true --module=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding/fontnik.node --module_name=fontnik --module_path=/home/anurag/temp_anurag/osm/fonts/node_modules/fontnik/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/anurag/temp_anurag/osm/fonts/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.0.0-38-generic
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/anurag/temp_anurag/osm/fonts/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build=true"
npm ERR! node-pre-gyp ERR! cwd /home/anurag/temp_anurag/osm/fonts/node_modules/fontnik
npm ERR! node-pre-gyp ERR! node -v v16.13.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/anurag/.npm/_logs/2022-07-31T02_38_57_989Z-debug-0.log
The default font stacks of the Mapbox GL style specification are Open Sans Regular
and Arial Unicode MS Regular
. They should be somehow covered (or aliased) by the fonts here.
"text-font": {
"type": "array",
"value": "string",
"function": "piecewise-constant",
"zoom-function": true,
"default": ["Open Sans Regular", "Arial Unicode MS Regular"],
"doc": "Font stack to use for displaying text.",
"requires": [
"text-field"
]
},
I am working on map font change from open sans to Noto Sans but facing issue in road label alignment. After changing the font labels are not central aligned it is shifted downside.
It would be great help if you can point some resolution steps for it.
Hey on the MapTiler site I noticed that Myanmar/Burmese labels are not rendering correctly. It is always tricky script to get right with harfbuzz, and WebGL doesn't make it any easier. Let me know if this is the right repo to file an issue.
One example of the problem is in the name of Myanmar - the first character (မ) is followed by its vowel sign ( ြ ) and they should combine into this: မြ but on the map tiles, you see the bracket-looking vowel mark around the next letter. Each character is added individually without regard to these combinations.
A related issue appears in some Bangla/Bengali labels in Bangladesh, for example Chattogram/Chittagong. The character ् should join two consonant characters, but instead it appears as a mark below the word and the surrounding characters are unmodified
The Noto Sans fonts are almost 100x bigger than Open Sans. The Noto Sans Regular is 33mb on disk, and Open Sans Regular is 400kb. All the other fonts are tiny, but Noto Sans is enormous. 100mb total.
Is this normal?
As a part of the work on adding support of Mapbox GL tiles to OSM Scout Server, I had to face the problem of distributing fonts as well. To be able to merge all Noto fonts into a single stack, I wrote a small python script that did it. Its available at https://github.com/rinigus/mapbox-gl-fonts as fontimport.py
. To run it, you would need PBF support for python, protoc and fontnik.
For Noto fonts import, it converts all Noto fonts separately into PBF-formatted glyphs collections and then iterates through all stack ranges, opens them up using known PBF format, and merges the glyphs from different PBFs in the order of given preference. As a result, I could ship my server having just a single Noto font and it seems to work correctly (although I am no expert in all used languages).
By using this approach you maybe able to drop having two fonts in your styles.
Hi ,
I am trying to show in the map SUBSCRIPT numbers, but I guess none of the fonts in here actually support that.
Are you planning to include any soon?
Add travis to build the gh-pages and force push these.
The script for building will call the generate.sh.
We have to add also release handle - which will create a .zip in release.
Such zip does not need to contained individual .zips for each font which are pushed to gh-pages for downloading from the mobile apps.
This repo is really helpful ,many thank. But recently I encounter a situation which is how to create fonts like Klokantech Noto Sans Bold,Klokantech Noto Sans CJK Bold which is two merged font .
If I understand the README.md correct, they should be available.
While testing using mapbox-gl
v1 on plotly/plotly.js#6990 it looks Extrabold
needed for "Open Sans" instead of Extra Bold
.
Lines 22 to 23 in 6b25d79
I got this error message when running npm install
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/fontnik/v0.5.0/Release/node-v64-linux-x64.tar.gz
Changing npm package fontnik
version to v0.5.3
in the package.json
fixed the problem for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.