u8g2-copy/tools/font/bdfconv/Makefile

209 lines
12 KiB
Makefile
Raw Normal View History

2015-11-07 20:00:10 +08:00
# works within ubuntu and min-gw (win7) environment
# win7 exe uploaded on google drive
2016-04-21 21:25:22 +08:00
CC = gcc
2015-11-07 20:00:10 +08:00
CFLAGS = -g -Wall
#CFLAGS = -O4 -Wall
2016-08-13 05:21:26 +08:00
SRC = main.c bdf_font.c bdf_glyph.c bdf_parser.c bdf_map.c bdf_rle.c bdf_tga.c fd.c bdf_8x8.c bdf_kern.c
2015-11-07 20:00:10 +08:00
OBJ = $(SRC:.c=.o)
ASM = $(SRC:.c=.s)
.c.s:
$(CC) $(CFLAGS) -S -o $@ $<
bdfconv: $(OBJ) $(ASM)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -o bdfconv
clean:
-rm $(OBJ) $(ASM) bdfconv
2016-08-13 05:21:26 +08:00
test: bdfconv
2015-11-09 02:02:19 +08:00
./bdfconv
2016-08-13 05:21:26 +08:00
greek: bdfconv
2015-11-09 02:02:19 +08:00
./bdfconv -f 1 -v -m '32-127,$$370-$$3ff' ../bdf/unifont.bdf -n unifont_greek -o unifont_greek.c -d ../bdf/7x13.bdf
2017-03-27 01:29:59 +08:00
2018-01-04 20:24:26 +08:00
10x20greek: bdfconv
./bdfconv -f 1 -v -m '32-127,$$370-$$3ff' ../bdf/10x20.bdf -n 10x20_greek -o 10x20_greek.c -d ../bdf/7x13.bdf
2017-03-27 01:29:59 +08:00
polish: bdfconv
./bdfconv -f 1 -v -m '32-127,$$104-$$107,$$118-$$119,$$141-$$144,$$15a-$$15b,$$179-$$17c,$$d3,$$f3' ../bdf/unifont.bdf -n unifont_polish -o unifont_polish.c -d ../bdf/7x13.bdf
2016-08-13 05:21:26 +08:00
helvb18: bdfconv
2016-08-15 20:18:42 +08:00
./bdfconv -f 1 -m '32-127,x32-64,x91-96,x123-191,x247,x697-879' -p 10 ../bdf/helvB18.bdf -o helvb18_tr.c -n u8g2_font_helvB18_tr -k helvb18_tr_k.c
2015-11-09 02:02:19 +08:00
2016-08-13 05:21:26 +08:00
helvb18n: bdfconv
2016-08-15 20:18:42 +08:00
./bdfconv -v -f 1 -m '32,48-57' ../bdf/helvB18.bdf -o helvb18_tn.c -n u8g2_font_helvB18_tn -d ../bdf/helvB18.bdf
2015-11-22 17:10:47 +08:00
logisoso: bdfconv
2016-12-17 17:08:46 +08:00
-../otf2bdf/otf2bdf -a -r 72 -p 131 -o tmp.bdf ../ttf/Logisoso.ttf
./bdfconv -v -f 1 -m '32,42-57' tmp.bdf -o u8g2_font_logisoso_tn.c -n u8g2_font_logisoso_tn -d ../bdf/helvB18.bdf
2018-07-07 19:03:06 +08:00
2018-08-04 04:56:56 +08:00
inr: bdfconv
-../otf2bdf/otf2bdf -a -r 72 -p 33 -o tmp.bdf ../ttf/inr.otf
./bdfconv -v -b 2 -f 1 -m '32,42-57' tmp.bdf -o u8g2_font_inr_m.c -n u8g2_font_inr_m -d ../bdf/helvB18.bdf
2018-07-07 19:03:06 +08:00
logisoso92x: bdfconv
-../otf2bdf/otf2bdf -a -r 72 -p 131 -o tmp.bdf ../ttf/Logisoso.ttf
./bdfconv -v -f 1 -m '32,42-57,65-70' tmp.bdf -o u8g2_font_logisoso92_tx.c -n u8g2_font_logisoso92_tx -d ../bdf/helvB18.bdf
2018-04-10 00:49:38 +08:00
fub: bdfconv
-../otf2bdf/otf2bdf -a -r 72 -p 40 -o tmp.bdf ../ttf/FreeUniversal-Bold.ttf
2018-04-11 05:01:58 +08:00
./bdfconv -v -f 2 -m '32-255' tmp.bdf -o fub30_tf.c -n fub30_tf -d ../bdf/helvB18.bdf
2018-04-10 00:49:38 +08:00
2018-05-10 20:11:45 +08:00
fub20x: bdfconv
-../otf2bdf/otf2bdf -a -r 72 -p 27 -o tmp.bdf ../ttf/FreeUniversal-Bold.ttf
./bdfconv -v -f 1 -m '32-127,8364' tmp.bdf -o u8g2_font_fub20_tx.c -n u8g2_font_fub20_tx -d ../bdf/helvB18.bdf
logisoso20x: bdfconv
-../otf2bdf/otf2bdf -a -r 72 -p 30 -o tmp.bdf ../ttf/Logisoso.ttf
./bdfconv -v -f 1 -m '32-127,8364' tmp.bdf -o u8g2_font_logisoso20_tx.c -n u8g2_font_logisoso20_tx -d ../bdf/helvB18.bdf
2018-01-04 20:24:26 +08:00
xlogisoso: bdfconv
-../otf2bdf/otf2bdf -a -r 72 -p 131 -o tmp.bdf ../ttf/Logisoso.ttf
./bdfconv -v -f 1 -m '32,42-57,$$370-$$3ff,$$2100-$$21ff' tmp.bdf -o u8g2_font_logisoso_tn.c -n u8g2_font_logisoso_tn -d ../bdf/helvB18.bdf
omega: bdfconv
2018-01-08 04:55:37 +08:00
-../otf2bdf/otf2bdf -a -r 72 -p 32 -o tmp.bdf ../ttf/FreeUniversal-Regular.ttf
./bdfconv -v -f 1 -m '32,35-57,$$300-$$3ff,$$2030-$$3000' tmp.bdf -o u8g2_font_omega_tn.c -n u8g2_font_omega_tn -d ../bdf/helvB18.bdf
2018-01-04 20:24:26 +08:00
2016-08-13 05:21:26 +08:00
tga: bdfconv
2016-07-27 22:05:26 +08:00
./bdfconv -v -f 1 -m '32-255' ../bdf/helvB18.bdf -o helvb18_tn.c -n u8g2_font_helvB18_tn -d ../bdf/7x13.bdf
2016-11-05 17:23:18 +08:00
etl: bdfconv
./bdfconv -v -f 1 -m '32-127,128-255>3552' ../bdf/etl16-thai.bdf -o etl16_t.c -n u8g2_font_etl16_t -d ../bdf/7x13.bdf
etl2: bdfconv
./bdfconv -v -f 1 -m '32-127,128-255>14*256-32' ../bdf/etl16-thai.bdf -o etl16_t.c -n u8g2_font_etl16_t -d ../bdf/7x13.bdf
2016-08-13 05:21:26 +08:00
artos: bdfconv
2015-11-23 06:28:55 +08:00
./bdfconv -b 3 -d ../bdf/7x13.bdf ../bdf/ArtosSerif-8.bdf -a -v
2015-11-09 02:02:19 +08:00
2017-05-21 03:53:57 +08:00
hebrew: bdfconv
./bdfconv -v -f 1 -m '32-128,$$590-$$5ff,$$fb1d-$$fb4f' ../bdf/unifont.bdf -o u8g2_hebrew.c -n u8g2_hebrew -d ../bdf/helvB18.bdf
2017-05-21 16:01:59 +08:00
korean: bdfconv
./bdfconv -v -f 1 -m '32-128,$$AC00-$$D7AF' ../bdf/unifont.bdf -o u8g2_korean.c -n u8g2_korean -d ../bdf/helvB18.bdf
2017-05-21 03:53:57 +08:00
2017-05-21 16:01:59 +08:00
bengali: bdfconv
./bdfconv -v -f 1 -m '32-128,$$980-$$9ff' ../bdf/unifont.bdf -o u8g2_bengali.c -n u8g2_bengali -d ../bdf/helvB12.bdf
2017-05-21 03:53:57 +08:00
2017-05-21 16:01:59 +08:00
urdu: bdfconv
./bdfconv -v -f 1 -m '32-128,$$600-$$6ff,$$750-$$77f,$$fb50-$$fdff,$$fe70-$$feff' ../bdf/unifont.bdf -o u8g2_urdu.c -n u8g2_urdu -d ../bdf/helvB12.bdf
2017-05-21 03:53:57 +08:00
lubr24: bdfconv
./bdfconv -f 1 -m '32-255' -p 10 lubR24.bdf -o lubR24.c -n u8g2_font_lubR24 -d ../bdf/helvB12.bdf
lurs24: bdfconv
./bdfconv -f 1 -m '32-255' -p 10 luRS24.bdf -o luRS24.c -n u8g2_font_luRS24 -d ../bdf/helvB12.bdf
2018-04-10 00:49:38 +08:00
2017-12-10 06:10:36 +08:00
siji: bdfconv
2018-01-14 22:10:31 +08:00
# ./bdfconv -v -f 1 -m '32-$$ffff' ./siji.bdf -o test1.c -n test -d ../bdf/helvB12.bdf
./bdfconv -v -f 1 -m '32-$$ffff' ../bdf/siji_with_6x10.bdf -o test2.c -n test -d ../bdf/helvB12.bdf
2018-01-15 04:00:23 +08:00
wqy: bdfconv
./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_9pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
2018-05-01 16:41:07 +08:00
# ./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_10pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
# ./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_13px.bdf -o test.c -n test -d ../bdf/helvB12.bdf
# ./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_11pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
# ./bdfconv -v -f 1 -M ../build/gb2312.map ../bdf/wenquanyi_12pt.bdf -o test.c -n test -d ../bdf/helvB12.bdf
2018-01-15 04:00:23 +08:00
2018-05-01 16:41:07 +08:00
ncenR24: bdfconv
./bdfconv -v -f 1 -b 0 -m '32-701>32,7838' ../bdf/ncenR24.bdf -n u8g2_font_ncenR24_te -o test.c
2017-12-10 06:10:36 +08:00
2017-05-21 03:53:57 +08:00
2016-04-21 21:25:22 +08:00
# http://stackoverflow.com/questions/713397/what-is-a-minimal-set-of-unicode-characters-for-reasonable-japanese-support
2016-04-22 05:04:56 +08:00
chinese: bdfconv
2018-01-20 22:02:04 +08:00
./bdfconv ../bdf/wenquanyi_9pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_wqy12_t_chinese1
convert bdf.tga -trim u8g2_font_wqy12_t_chinese1.png
./bdfconv ../bdf/wenquanyi_9pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_wqy12_t_chinese2
convert bdf.tga -trim u8g2_font_wqy12_t_chinese2.png
./bdfconv ../bdf/wenquanyi_9pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_wqy12_t_chinese3
convert bdf.tga -trim u8g2_font_wqy12_t_chinese3.png
./bdfconv ../bdf/wenquanyi_9pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312.map -d ../bdf/7x13.bdf -n u8g2_font_wqy12_t_gb2312
convert bdf.tga -trim u8g2_font_wqy12_t_gb2312.png
./bdfconv ../bdf/wenquanyi_9pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312a.map -d ../bdf/7x13.bdf -n u8g2_font_wqy12_t_gb2312a
convert bdf.tga -trim u8g2_font_wqy12_t_gb2312a.png
./bdfconv ../bdf/wenquanyi_9pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312b.map -d ../bdf/7x13.bdf -n u8g2_font_wqy12_t_gb2312b
convert bdf.tga -trim u8g2_font_wqy12_t_gb2312b.png
./bdfconv ../bdf/wenquanyi_10pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_wqy13_t_chinese1
convert bdf.tga -trim u8g2_font_wqy13_t_chinese1.png
./bdfconv ../bdf/wenquanyi_10pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_wqy13_t_chinese2
convert bdf.tga -trim u8g2_font_wqy13_t_chinese2.png
./bdfconv ../bdf/wenquanyi_10pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_wqy13_t_chinese3
convert bdf.tga -trim u8g2_font_wqy13_t_chinese3.png
./bdfconv ../bdf/wenquanyi_10pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312.map -d ../bdf/7x13.bdf -n u8g2_font_wqy13_t_gb2312
convert bdf.tga -trim u8g2_font_wqy13_t_gb2312.png
./bdfconv ../bdf/wenquanyi_10pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312a.map -d ../bdf/7x13.bdf -n u8g2_font_wqy13_t_gb2312a
convert bdf.tga -trim u8g2_font_wqy13_t_gb2312a.png
./bdfconv ../bdf/wenquanyi_10pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312b.map -d ../bdf/7x13.bdf -n u8g2_font_wqy13_t_gb2312b
convert bdf.tga -trim u8g2_font_wqy13_t_gb2312b.png
./bdfconv ../bdf/wenquanyi_13px.bdf -g 32 -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_wqy14_t_chinese1
convert bdf.tga -trim u8g2_font_wqy14_t_chinese1.png
./bdfconv ../bdf/wenquanyi_13px.bdf -g 32 -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_wqy14_t_chinese2
convert bdf.tga -trim u8g2_font_wqy14_t_chinese2.png
./bdfconv ../bdf/wenquanyi_13px.bdf -g 32 -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_wqy14_t_chinese3
convert bdf.tga -trim u8g2_font_wqy14_t_chinese3.png
./bdfconv ../bdf/wenquanyi_13px.bdf -g 32 -b 0 -f 1 -M ../build/gb2312.map -d ../bdf/7x13.bdf -n u8g2_font_wqy14_t_gb2312
convert bdf.tga -trim u8g2_font_wqy14_t_gb2312.png
./bdfconv ../bdf/wenquanyi_13px.bdf -g 32 -b 0 -f 1 -M ../build/gb2312a.map -d ../bdf/7x13.bdf -n u8g2_font_wqy14_t_gb2312a
convert bdf.tga -trim u8g2_font_wqy14_t_gb2312a.png
./bdfconv ../bdf/wenquanyi_13px.bdf -g 32 -b 0 -f 1 -M ../build/gb2312b.map -d ../bdf/7x13.bdf -n u8g2_font_wqy14_t_gb2312b
convert bdf.tga -trim u8g2_font_wqy14_t_gb2312b.png
./bdfconv ../bdf/wenquanyi_11pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_wqy15_t_chinese1
convert bdf.tga -trim u8g2_font_wqy15_t_chinese1.png
./bdfconv ../bdf/wenquanyi_11pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_wqy15_t_chinese2
convert bdf.tga -trim u8g2_font_wqy15_t_chinese2.png
./bdfconv ../bdf/wenquanyi_11pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_wqy15_t_chinese3
convert bdf.tga -trim u8g2_font_wqy15_t_chinese3.png
./bdfconv ../bdf/wenquanyi_11pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312.map -d ../bdf/7x13.bdf -n u8g2_font_wqy15_t_gb2312
convert bdf.tga -trim u8g2_font_wqy15_t_gb2312.png
./bdfconv ../bdf/wenquanyi_11pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312a.map -d ../bdf/7x13.bdf -n u8g2_font_wqy15_t_gb2312a
convert bdf.tga -trim u8g2_font_wqy15_t_gb2312a.png
./bdfconv ../bdf/wenquanyi_11pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312b.map -d ../bdf/7x13.bdf -n u8g2_font_wqy15_t_gb2312b
convert bdf.tga -trim u8g2_font_wqy15_t_gb2312b.png
./bdfconv ../bdf/wenquanyi_12pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_wqy16_t_chinese1
convert bdf.tga -trim u8g2_font_wqy16_t_chinese1.png
./bdfconv ../bdf/wenquanyi_12pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_wqy16_t_chinese2
convert bdf.tga -trim u8g2_font_wqy16_t_chinese2.png
./bdfconv ../bdf/wenquanyi_12pt.bdf -g 32 -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_wqy16_t_chinese3
convert bdf.tga -trim u8g2_font_wqy16_t_chinese3.png
./bdfconv ../bdf/wenquanyi_12pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312.map -d ../bdf/7x13.bdf -n u8g2_font_wqy16_t_gb2312
convert bdf.tga -trim u8g2_font_wqy16_t_gb2312.png
./bdfconv ../bdf/wenquanyi_12pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312a.map -d ../bdf/7x13.bdf -n u8g2_font_wqy16_t_gb2312a
convert bdf.tga -trim u8g2_font_wqy16_t_gb2312a.png
./bdfconv ../bdf/wenquanyi_12pt.bdf -g 32 -b 0 -f 1 -M ../build/gb2312b.map -d ../bdf/7x13.bdf -n u8g2_font_wqy16_t_gb2312b
convert bdf.tga -trim u8g2_font_wqy16_t_gb2312b.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/unifont.bdf -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_unifont_t_chinese1
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_unifont_t_chinese1.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/unifont.bdf -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_unifont_t_chinese2
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_unifont_t_chinese2.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/unifont.bdf -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_unifont_t_chinese3
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_unifont_t_chinese3.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/gb16st.bdf -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_gb16st_t_1
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_gb16st_t_1.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/gb16st.bdf -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_gb16st_t_2
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_gb16st_t_2.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/gb16st.bdf -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_gb16st_t_3
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_gb16st_t_3.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/gb24st.bdf -b 0 -f 1 -M ../build/chinese1.map -d ../bdf/7x13.bdf -n u8g2_font_gb24st_t_1
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_gb24st_t_1.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/gb24st.bdf -b 0 -f 1 -M ../build/chinese2.map -d ../bdf/7x13.bdf -n u8g2_font_gb24st_t_2
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_gb24st_t_2.png
2016-04-22 05:16:45 +08:00
./bdfconv ../bdf/gb24st.bdf -b 0 -f 1 -M ../build/chinese3.map -d ../bdf/7x13.bdf -n u8g2_font_gb24st_t_3
2016-04-22 05:04:56 +08:00
convert bdf.tga -trim u8g2_font_gb24st_t_3.png