summarylogtreecommitdiffstats
path: root/0001-let-freetype-handle-ISO-8859-1-mapping.patch
diff options
context:
space:
mode:
authorRyan Farley2019-08-31 07:04:50 -0500
committerRyan Farley2019-08-31 07:07:19 -0500
commit4d692f5b46f4e1556e3d1e2f6fcb03beddee3403 (patch)
tree877dabb9591cf64883081915a7664c4e869acfaa /0001-let-freetype-handle-ISO-8859-1-mapping.patch
parentec88257753a14fb41ed4ce90ad2ed1124edaa25d (diff)
downloadaur-4d692f5b46f4e1556e3d1e2f6fcb03beddee3403.tar.gz
patches to fix segfaults, handle more encodings
...should probably include PKGBUILD and SRCINFO
Diffstat (limited to '0001-let-freetype-handle-ISO-8859-1-mapping.patch')
-rw-r--r--0001-let-freetype-handle-ISO-8859-1-mapping.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/0001-let-freetype-handle-ISO-8859-1-mapping.patch b/0001-let-freetype-handle-ISO-8859-1-mapping.patch
new file mode 100644
index 000000000000..24b7e587f351
--- /dev/null
+++ b/0001-let-freetype-handle-ISO-8859-1-mapping.patch
@@ -0,0 +1,35 @@
+From ae7f143f7b8dd14fd720061922a5a5e03fa60218 Mon Sep 17 00:00:00 2001
+From: Ryan Farley <ryan.farley@gmx.com>
+Date: Tue, 20 Aug 2019 03:16:22 -0500
+Subject: [PATCH app/fonttosfnt 1/2] let freetype handle ISO-8859-1 mapping
+
+https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_encoding
+indicates that ISO-8859-1 is automatically mapped to Unicode for BDF and
+PCF fonts -- trying to use FT_Select_Charmap() with FT_ENCODING_NONE
+leads to an error for such fonts.
+---
+ read.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/read.c b/read.c
+index 632c7e7..5e80cc5 100644
+--- a/read.c
++++ b/read.c
+@@ -79,10 +79,13 @@ readFile(char *filename, FontPtr font)
+ return -1;
+ }
+
++ /* FreeType will handle Unicode and automatically map ISO-8859-1 to
++ * Unicode for us -- everything else needs a mapping */
+ encoding_name = faceEncoding(face);
+ if(encoding_name == NULL) {
+ symbol = 1;
+- } else if(strcasecmp(encoding_name, "iso10646-1") != 0) {
++ } else if((strcasecmp(encoding_name, "iso10646-1") != 0) &&
++ (strcasecmp(encoding_name, "iso8859-1") != 0)) {
+ if(reencode_flag)
+ mapping = FontEncMapFind(encoding_name,
+ FONT_ENCODING_UNICODE, 0, 0, NULL);
+--
+2.23.0
+