|
|
|
# Qunifont
|
|
|
|
|
|
|
|
Qunifont is a [qunified](https://typotheque.genderfluid.space/fr/quni#quni) version of the [Unifont](https://unifoundry.com/unifont/index.html)
|
|
|
|
|
|
|
|
## Drawing new Qunifont glyphs in a pad
|
|
|
|
|
|
|
|
Download, extract and rename the last Unifont tar.gz file (https://unifoundry.com/pub/unifont/?C=M;O=D) to get access to the Unifont utilities scripts
|
|
|
|
|
|
|
|
curl https://unifoundry.com/pub/unifont/unifont-16.0.01/unifont-16.0.01.tar.gz -o unifont.tar.gz
|
|
|
|
tar -xvf unifont.tar.gz
|
|
|
|
mv unifont-16.0.01 unifont
|
|
|
|
|
|
|
|
TODO: Change metadata in `hex2otf.c`
|
|
|
|
|
|
|
|
see unifont/src/hex2otf
|
|
|
|
|
|
|
|
Change the GLYPH_MAX_WIDTH variable in `hex2otf.c` to 64 and compile it with `gcc unifont/src/hex2otf.c -o unifont/src/hex2otf`
|
|
|
|
|
|
|
|
#define GLYPH_MAX_WIDTH 64 ///< Maximum glyph width, in pixels.
|
|
|
|
|
|
|
|
Draw glyphs in a pad following this format (hexadecimal identifier):
|
|
|
|
|
|
|
|
F4910:
|
|
|
|
----------------
|
|
|
|
----------------
|
|
|
|
----------------
|
|
|
|
----------------
|
|
|
|
---#----######--
|
|
|
|
---#---#------#-
|
|
|
|
---#---#------#-
|
|
|
|
-##############-
|
|
|
|
---#------------
|
|
|
|
---#------------
|
|
|
|
---#------------
|
|
|
|
---#------------
|
|
|
|
---#------------
|
|
|
|
----##----------
|
|
|
|
----------------
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Run `padascii2uniascii.sh` to download the pad's content and format it for the Unifont utilities (uniascii)
|
|
|
|
|
|
|
|
./padascii2uniascii.sh http://92.131.57.17:9001/p/qunifont > qunifont.txt
|
|
|
|
|
|
|
|
Run `mergehex.sh` to convert `qunifont.txt` (uniascii) to unihex and merge it with the `unfont-base.hex` file
|
|
|
|
|
|
|
|
./mergehex.sh
|
|
|
|
|
|
|
|
Convert unihex to otf, --help for format list
|
|
|
|
|
|
|
|
./unifont/src/hex2otf hex=merge.hex out=qunifont.otf format=truetype
|
|
|
|
|
|
|
|
Add OpenType features (in fontforge for the moment)
|
|
|
|
|
|
|
|
open qunifont.otf > file > merge feature info > select file > features_qunifont.fea
|
|
|
|
|
|
|
|
|
|
|
|
## Other useful commands etc.
|
|
|
|
|
|
|
|
Convert uniascii to unihex
|
|
|
|
|
|
|
|
./unifont/src/hexdraw qunifont.txt > qunifont.hex
|
|
|
|
|
|
|
|
Convert unihex to png preview table (-p for plage)
|
|
|
|
|
|
|
|
./unifont/src/unihex2png -i qunifont.hex -o qunifont.png -p 0
|
|
|
|
|
|
|
|
Convert unihex to bdf
|
|
|
|
|
|
|
|
./unifont/src/hex2bdf qunifont.hex > qunifont.bdf
|
|
|
|
|
|
|
|
Convert unihex to sfd
|
|
|
|
|
|
|
|
./unifont/src/hex2sfd < qunifont.hex > qunifont.sfd
|
|
|
|
|
|
|
|
Print specific glyph in terminal from hexcode
|
|
|
|
|
|
|
|
printf %b\\n \\UF1010
|
|
|
|
|
|
|
|
|
|
|
|
printf %b\\n \\UFFE1
|
|
|
|
£
|
|
|
|
|
|
|
|
printf %b\\n \\U1F480
|
|
|
|
💀
|
|
|
|
|
|
|
|
Download .fea from BBB
|
|
|
|
|
|
|
|
curl -O https://gitlab.com/bye-bye-binary/typotheque/-/raw/master/features-samples/features_exemple_long.fea
|
|
|
|
|
|
|
|
Edit Fontforge Lookup table
|
|
|
|
|
|
|
|
Element > Font Info > Lookup
|
|
|
|
|
|
|
|
Import .fea file in Fontforge
|
|
|
|
|
|
|
|
File > Import merge features
|