bzt fa73c3b58d Read glyphs from a sample file 9 mēneši atpakaļ
..
freetype2 6b800f8fac Static memory, vectorization, sfd, pcf, fnt support 4 gadi atpakaļ
libimagequant aaa18f051b Static, built-in dependencies only 4 gadi atpakaļ
potracelib aaa18f051b Static, built-in dependencies only 4 gadi atpakaļ
Makefile 6b800f8fac Static memory, vectorization, sfd, pcf, fnt support 4 gadi atpakaļ
Makefile.env 14991afb0d More fonts and BDF parsing 2 gadi atpakaļ
README.md 0f5aa706b6 Precompiled packages 4 gadi atpakaļ
bitmap.c facb445b00 Minor fixes, ROM format, font samples 9 mēneši atpakaļ
bitmap.h facb445b00 Minor fixes, ROM format, font samples 9 mēneši atpakaļ
libsfn.h fa73c3b58d Read glyphs from a sample file 9 mēneši atpakaļ
sfn.c fa73c3b58d Read glyphs from a sample file 9 mēneši atpakaļ
stb_png.h 74abdac6d6 Minor fixes in printf strings and updated UNICODE database 3 gadi atpakaļ
unicode.c facb445b00 Minor fixes, ROM format, font samples 9 mēneši atpakaļ
unicode.h 05834c4ce9 Font preview, BMF and YAFF format support 9 mēneši atpakaļ
unicode.php a0f7d1fa68 Minor fixes and recompiled binaries 3 gadi atpakaļ
util.c 39d1a25983 Added new file formats and more bullet-proof bdf parsing 1 gadu atpakaļ
util.h 39d1a25983 Added new file formats and more bullet-proof bdf parsing 1 gadu atpakaļ
vector.c fa73c3b58d Read glyphs from a sample file 9 mēneši atpakaļ
vector.h 6b800f8fac Static memory, vectorization, sfd, pcf, fnt support 4 gadi atpakaļ
zlib.c aaa18f051b Static, built-in dependencies only 4 gadi atpakaļ
zlib.h aaa18f051b Static, built-in dependencies only 4 gadi atpakaļ

README.md

Scalable Screen Font 2.0 Utility Library

This is a library to manipulate SSFN files as well as import other formats. For the latter it has some dependencies. This library is only used by the converter and the editor, and NOT needed by the renderer. The library relies on the renderer, and not the other way around. See libsfn's API for more details.

Heavily stripped down versions of the required libraries are linked statically by default. These include:

  • potrace to convert bitmap fonts to scalable vector fonts
  • zlib for compressing fonts on-the-fly (uncompression is implemented in ssfn.h)
  • libimagequant to quantize truecolor pixel fonts
  • freetype2 to import TTF / OTF / WOFF / PS Type 1 / PS Type 42 etc.

Compilation

To generate the static library, run

$ make libsfn.a

If you rather have dynamically linked dependencies (libimagequant and freetype2), then

$ USE_DYNDEPS=1 make libsfn.a

I would recommend static dependencies under Windows, and dynamic under Linux (and other POSIX systems with decent package management for shared libraries).

To exclude importing foreign font formats altogether and just support SSFN and ASC (no need for libimagequant nor freetype2), then use

$ USE_NOFOREIGN=1 make libsfn.a

Note: to avoid .dll.a linking issues under MinGW, both sfnconv and sfnedit directly links with the .o object files of libsfn. K.I.S.S.! :-)