Skip to contentSkip to conversation

qt: add enable for truetype font installation

PATCH New Danomi Manchego 2 participants 2 messages Mar 24, 2017 – Mar 25, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 qt: add enable for truetype font installation

Currently, qt.mk installs DejaVu/Vera TrueType fonts when Qt is configured for freetype support. However, some users may prefer to limit the installed fonts to only Qt's prerendered fonts (micro, fixed, helvetica, etc.). Or, there may be a preference to use seperately installed TrueType fonts. This commit adds a switch to explicitly control the installation of the TrueType fonts, similar to the existing prerendered font enables.

---

Changes V3->V4:
- Fix spelling of "PACKAGE".
- Add Reviewed-by: Peter Seiderer <[email protected]>

Changes V2->V3:
- Add back some detail to commit log. (Thomas Petazzoni)

Changes V1->V2:
- Drop detailed explanation from commit log. (Peter Seiderer)
- Rename option from ..DEJAVU to ..TRUETYPE. (Peter Seiderer)
- Replace depends-on test with equivalent but more verbose expression. (Peter Seiderer)

---
 package/qt/Config.in | 8 ++++++++
 package/qt/qt.mk     | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)
package/qt/Config.in +8 -0
index fa5235d..a761759 100644
@@ -185,6 +185,14 @@ endmenu
 
 menu "Fonts"
 
+config BR2_PACKAGE_QT_FONT_TRUETYPE
+	bool "dejavu/vera"
+	depends on BR2_PACKAGE_QT_QTFREETYPE || BR2_PACKAGE_QT_SYSTEMFREETYPE
+	default y
+
+comment "dejavu/vera fonts need freetype support"
+	depends on !BR2_PACKAGE_QT_QTFREETYPE && !BR2_PACKAGE_QT_SYSTEMFREETYPE
+
 config BR2_PACKAGE_QT_FONT_MICRO
 	bool "micro"
 	default y
package/qt/qt.mk +1 -1
index e82bdfe8..1faab74 100644
@@ -689,7 +689,7 @@ QT_LICENSE_FILES += src/3rdparty/fonts/COPYRIGHT.Unifont
 endif
 endif # QT_FONTS
 
-ifeq ($(BR2_PACKAGE_QT_QTFREETYPE)$(BR2_PACKAGE_QT_SYSTEMFREETYPE),y)
+ifeq ($(BR2_PACKAGE_QT_FONT_TRUETYPE),y)
 define QT_INSTALL_TARGET_FONTS_TTF
 	mkdir -p $(TARGET_DIR)/usr/lib/fonts
 	cp -dpf $(STAGING_DIR)/usr/lib/fonts/*.ttf $(TARGET_DIR)/usr/lib/fonts
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 1/1 qt: add enable for truetype font installation

Hello,

Quoted 11 lines · Danomi Manchego

Currently, qt.mk installs DejaVu/Vera TrueType fonts when Qt is configured for freetype support. However, some users may prefer to limit the installed fonts to only Qt's prerendered fonts (micro, fixed, helvetica, etc.). Or, there may be a preference to use seperately installed TrueType fonts. This commit adds a switch to explicitly control the installation of the TrueType fonts, similar to the existing prerendered font enables.

---

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com