summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Gupta <ashmew2@gmail.com>2017-05-11 19:44:00 (GMT)
committer Ashish Gupta <ashmew2@gmail.com>2017-09-12 17:59:04 (GMT)
commit75f67687749db19b3dfc152292aa001a3203e289 (patch)
tree8e8bf488f8efcfa97c57ac1a36af977aeb4c2b29
parent571d788f118f0314e933f2c0f89bd928131df236 (diff)
downloadnetsurf-75f67687749db19b3dfc152292aa001a3203e289.tar.gz
netsurf-75f67687749db19b3dfc152292aa001a3203e289.tar.bz2
Switch to freetype fonts!
-rw-r--r--Makefile2
-rw-r--r--frontends/kolibrios/Makefile10
-rw-r--r--frontends/kolibrios/Makefile.defaults7
-rw-r--r--frontends/kolibrios/fb/Makefile2
4 files changed, 11 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 5975288..363b0a2 100644
--- a/Makefile
+++ b/Makefile
@@ -726,7 +726,7 @@ OBJECTS := $(sort $(addprefix $(OBJROOT)/,$(subst /,_,$(patsubst %.c,%.o,$(patsu
IFLAGS = $(addprefix -I,$(INCLUDE_DIRS))
ifeq ($(TARGET),kolibrios)
- KOLOBJECTS = $(HOME)/kolibrios/programs/fs/unzip60/kolibri/dirent.o $(HOME)/NETSURFLIBS/netsurf/font_internal.o $(HOME)/NETSURFLIBS/netsurf/frontends/kolibrios/asmobj/loadhttp.obj $(HOME)/kolibrios/programs/develop/libraries/iconv/iconv.o
+ KOLOBJECTS = $(HOME)/kolibrios/programs/fs/unzip60/kolibri/dirent.o $(HOME)/NETSURFLIBS/netsurf/frontends/kolibrios/asmobj/loadhttp.obj $(HOME)/kolibrios/programs/develop/libraries/iconv/iconv.o
endif
$(EXETARGET): $(OBJECTS) $(RESOURCES) $(MESSAGES)
diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile
index f875ba1..0a7da7f 100644
--- a/frontends/kolibrios/Makefile
+++ b/frontends/kolibrios/Makefile
@@ -1,5 +1,5 @@
CWARNFLAGS += -Wno-error -Wno-redundant-decls -Wno-char-subscripts -Wno-undef -Wno-implicit-function-declaration -Wno-int-conversion -Wno-nested-externs -Wno-format-extra-args -Wno-format
-DMACROS := -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -D_NETBSD_SOURCE -D_TARGET_IS_KOLIBRIOS
+DMACROS := -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -D_NETBSD_SOURCE -D_TARGET_IS_KOLIBRIOS -DKOLIBRI_USE_FREETYPE -DFB_USE_FREETYPE
KOL_OTHER_INCLUDES := -I$(HOME)/kolibrios/contrib/sdk/sources/libpng/ -I$(HOME)/kolibrios/contrib/sdk/sources/zlib -I$(HOME)/kolibrios/contrib/sdk/sources/freetype/include -I$(HOME)/kolibrios/contrib/sdk/sources/freetype/include -I$(HOME)/kolibrios/contrib/sdk/sources/libjpeg
@@ -107,13 +107,13 @@ S_FONTS += $(2)
$(warning Adding to S_FONTS : $(2))
$(2): $(1) $(TOOLROOT)/convert_font
$(VQ)echo " FONT: $(1) ($(4))"
- $(Q)$(TOOLROOT)/convert_font -H $(3) $(1) $(2)
+ $(Q)$(TOOLROOT)/convert_font -d -H $(3) $(1) $(2)
endef
S_FONTS :=
-$(eval $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$($(V)),$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).h,$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)))))
+# $(eval $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$($(V)),$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).h,$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)))))
-$(warning $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$($(V)),$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).h,$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)))))
+# $(error $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$($(V)),$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)).h,$(patsubst KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,%,$(V)))))
# non optional pkg-configed libs
#$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
#$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
@@ -131,7 +131,7 @@ $(warning $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARI
#S_KOLIBRIOS := main.c kolibri_misc.c kolibri_debug.c kolibri_filesystem.c kolibri_regex.c
S_KOLIBRIOS := kolibri_http.c
-S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c localhistory.c clipboard.c
+S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c localhistory.c clipboard.c font_freetype.c
S_FRAMEBUFFER_FBTK := fbtk.c event.c fill.c bitmap.c user.c window.c text.c scroll.c osk.c
S_FRAMEBUFFER := $(addprefix fb/,$(S_FRAMEBUFFER))
diff --git a/frontends/kolibrios/Makefile.defaults b/frontends/kolibrios/Makefile.defaults
index fe76851..c727c64 100644
--- a/frontends/kolibrios/Makefile.defaults
+++ b/frontends/kolibrios/Makefile.defaults
@@ -23,11 +23,12 @@ NETSURF_USE_ROSPRITE := NO
# Library to use for font plotting
# Valid options: internal, freetype
-NETSURF_KOLIBRI_FONTLIB := internal
+NETSURF_KOLIBRI_FONTLIB := freetype
+NETSURF_KOLIBRI_FONTPATH := /usbhd0/1/bin/res/
# Default freetype font files
-NETSURF_KOLIBRI_FONT_SANS_SERIF := frontends/kolibrios/res/sans.ttf
-KOLIBRI_FONT_freetype_sans_serif := frontends/kolibrios/res/sans.ttf
+NETSURF_KOLIBRI_FONT_SANS_SERIF := sans.ttf
+KOLIBRI_FONT_freetype_sans := sans.ttf
# Default binary install path
NETSURF_FRAMEBUFFER_BIN := $(PREFIX)/bin/
diff --git a/frontends/kolibrios/fb/Makefile b/frontends/kolibrios/fb/Makefile
index 6d2acb0..589a73d 100644
--- a/frontends/kolibrios/fb/Makefile
+++ b/frontends/kolibrios/fb/Makefile
@@ -138,7 +138,7 @@ endef
S_FONTS :=
-$(eval $(foreach V,$(filter FB_FONT_$(NETSURF_FB_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$(FRONTEND_RESOURCES_DIR)/$($(V)),$(OBJROOT)/font-$(patsubst FB_FONT_$(NETSURF_FB_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst FB_FONT_$(NETSURF_FB_FONTLIB)_%,%,$(V)).h,$(patsubst FB_FONT_$(NETSURF_FB_FONTLIB)_%,%,$(V)))))
+# $(eval $(foreach V,$(filter FB_FONT_$(NETSURF_FB_FONTLIB)_%,$(.VARIABLES)),$(call convert_font,$(FRONTEND_RESOURCES_DIR)/$($(V)),$(OBJROOT)/font-$(patsubst FB_FONT_$(NETSURF_FB_FONTLIB)_%,%,$(V)).c,$(OBJROOT)/font-$(patsubst FB_FONT_$(NETSURF_FB_FONTLIB)_%,%,$(V)).h,$(patsubst FB_FONT_$(NETSURF_FB_FONTLIB)_%,%,$(V)))))
# ----------------------------------------------------------------------------
# Source file setup