>From 9817247baeaab6781acda56214fc4c1d31aa676d Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Sat, 12 May 2018 00:24:38 +0900 Subject: [PATCH 1/9] Makefile: Add sed pattern to accommodate fontconfig 2.13.0 It is observed that fontconfig 2.13.0 recognizes "Steel City Comic" font just as "Test". Add sed patterns to convert the fontfamily specifier in .svg files on-the-fly in such cases. This issue is observed on Fedora 28. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index a208920..2b2ce2e 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,8 @@ FIXSVGFONTS = utilities/fixsvgfonts-urwps.sh FIXANEPSFONTS = utilities/fixanepsfonts-urwps.sh endif +STEELFONTID := $(shell fc-list | grep -i steel | grep -c Steel) + default = $(PERFBOOK_DEFAULT) ifeq ($(default),) @@ -204,7 +206,11 @@ $(PDFTARGETS_OF_SVG): %.pdf: %.svg ifndef INKSCAPE $(error "$< --> $@: inkscape not found. Please install it.") endif +ifeq ($(STEELFONTID),0) + @sh $(FIXSVGFONTS) < $< | sed -e 's/Steel City Comic/Test/g' > $<i +else @sh $(FIXSVGFONTS) < $< > $<i +endif @inkscape --export-pdf=$@ $<i > /dev/null 2>&1 @rm -f $<i @@ -213,7 +219,11 @@ $(PNGTARGETS_OF_SVG): %.png: %.svg ifndef INKSCAPE $(error "$< --> $@: inkscape not found. Please install it.") endif +ifeq ($(STEELFONTID),0) + @sh $(FIXSVGFONTS) < $< | sed -e 's/Steel City Comic/Test/g' > $<i +else @sh $(FIXSVGFONTS) < $< > $<i +endif @inkscape --export-dpi=200 --export-png=$@ $<i > /dev/null 2>&1 @rm -f $<i -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html