From c6ea17bccd08175eaa6bfda3ec438aa5e6fbbeda Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Thu, 11 May 2017 21:44:00 +0200 Subject: Switch to freetype fonts! --- frontends/kolibrios/Makefile | 10 +++++----- frontends/kolibrios/Makefile.defaults | 7 ++++--- frontends/kolibrios/fb/Makefile | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'frontends') diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile index f875ba14f..0a7da7ff7 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 fe768515b..c727c6451 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 6d2acb079..589a73d3c 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 -- cgit v1.2.3