
This font is less complete than our bitmap font, Unifont: Unifont has essentially complete Unicode coverage and LibreCAD's font only has Latin, Cyrillic and Japanese, but it can be extended rather easily, so this should be fine for now. These embedded fonts fatten glhelper.o quite a bit: bitmapfont.table.h is about 8M in gzip-compressed bitmaps and vectorfont.table.h is about 2M in raw vector data. In spite of that it takes just around five seconds to build glhelper.c on my laptop, so it should be fine. The final executable grows from about 2M to about 8M, but this is a small price to pay for fairly extensive i18n support. The new font has somewhat different metrics, so the rendering code has been fudged to make it look good.
24 lines
385 B
CMake
24 lines
385 B
CMake
include_directories(
|
|
${PNG_INCLUDE_DIRS})
|
|
|
|
link_directories(
|
|
${PNG_LIBRARY_DIRS})
|
|
|
|
add_executable(png2c
|
|
png2c.cpp)
|
|
|
|
target_link_libraries(png2c
|
|
${PNG_LIBRARIES})
|
|
|
|
add_executable(unifont2c
|
|
unifont2c.cpp)
|
|
|
|
target_link_libraries(unifont2c
|
|
${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
|
|
|
|
add_executable(lff2c
|
|
lff2c.cpp)
|
|
|
|
target_link_libraries(lff2c
|
|
${ZLIB_LIBRARIES})
|