Skip to content

Commit

Permalink
Merge pull request #20 from shermp/opentype
Browse files Browse the repository at this point in the history
OpenType Support
  • Loading branch information
NiLuJe authored Oct 31, 2018
2 parents 621dd56 + 1b294aa commit b4eb792
Show file tree
Hide file tree
Showing 9 changed files with 1,066 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "stb"]
path = stb
url = https://github.com/nothings/stb.git
[submodule "libunibreak"]
path = libunibreak
url = https://github.com/adah1972/libunibreak
5 changes: 4 additions & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ This project makes use of a number of third-party libraries, which we'll acknowl
Released into the public domain.
(https://www.cprogramming.com/tutorial/unicode.html)

* stb_image (Image loader), by Sean Barrett,
* stb_image (Image loader) and stb_truetype (font renderer), by Sean Barrett,
Released into the public domain.
(http://nothings.org/stb)

* libunibreak (Unicode line breaking implementation) by Wu Yongwei, et al
Licensed under the Zlib license
(https://github.com/adah1972/libunibreak)

As well as a number of third-party resources (namely, font files):

Expand Down
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,16 @@ ifdef MATHS
EXTRA_CPPFLAGS+=-DFBINK_WITH_MATHS
LIBS+=-lm
endif

ifndef MINIMAL
LIBS+=-lm
endif
##
# Now that we're done fiddling with flags, let's build stuff!
LIB_SRCS=fbink.c utf8/utf8.c
ifdef MINIMAL
LIB_SRCS=fbink.c utf8/utf8.c
else
LIB_SRCS=fbink.c utf8/utf8.c libunibreak/src/linebreak.c libunibreak/src/linebreakdata.c libunibreak/src/unibreakdef.c libunibreak/src/linebreakdef.c
endif
CMD_SRCS=fbink_cmd.c
BTN_SRCS=button_scan_cmd.c
# Unless we're asking for a minimal build, include the Unscii fonts, too
Expand All @@ -191,6 +197,7 @@ ifdef MINIMAL
else
EXTRA_CPPFLAGS+=-DFBINK_WITH_FONTS
EXTRA_CPPFLAGS+=-DFBINK_WITH_IMAGE
EXTRA_CPPFLAGS+=-DFBINK_WITH_OPENTYPE
# Connect button scanning is Kobo specific
ifndef KINDLE
ifndef CERVANTES
Expand Down Expand Up @@ -235,7 +242,7 @@ $(OUT_DIR)/%.o: %.c
$(CC) $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $(SHARED_CFLAGS) -o $@ -c $<

outdir:
mkdir -p $(OUT_DIR)/shared/utf8 $(OUT_DIR)/static/utf8
mkdir -p $(OUT_DIR)/shared/utf8 $(OUT_DIR)/static/utf8 $(OUT_DIR)/shared/libunibreak/src $(OUT_DIR)/static/libunibreak/src

all: outdir static

Expand Down Expand Up @@ -349,17 +356,21 @@ clean:
rm -rf Release/*.so*
rm -rf Release/shared/*.o
rm -rf Release/shared/utf8/*.o
rm -rf Release/shared/libunibreak/src/*.o
rm -rf Release/static/*.o
rm -rf Release/static/utf8/*.o
rm -rf Release/static/libunibreak/src/*.o
rm -rf Release/*.o
rm -rf Release/fbink
rm -rf Release/button_scan
rm -rf Debug/*.a
rm -rf Debug/*.so*
rm -rf Debug/shared/*.o
rm -rf Debug/shared/utf8/*.o
rm -rf Debug/shared/libunibreak/src/*.o
rm -rf Debug/static/*.o
rm -rf Debug/static/utf8/*.o
rm -rf Debug/static/libunibreak/src/*.o
rm -rf Debug/*.o
rm -rf Debug/fbink
rm -rf Debug/button_scan
Expand Down
Loading

0 comments on commit b4eb792

Please sign in to comment.