diff options
author | Ryan Farley | 2019-11-27 11:05:17 -0600 |
---|---|---|
committer | Ryan Farley | 2019-11-27 11:05:17 -0600 |
commit | 13d08907f5ede8bf3a79ef6a1d4c4fd344cb9a80 (patch) | |
tree | e3785b0c049d9bd852a091ab7c5da8375af2b140 | |
parent | 4d692f5b46f4e1556e3d1e2f6fcb03beddee3403 (diff) | |
download | aur-13d08907f5ede8bf3a79ef6a1d4c4fd344cb9a80.tar.gz |
add font size guess patch
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | 0004-improve-guess-font-size.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 6 |
3 files changed, 49 insertions, 2 deletions
@@ -19,10 +19,12 @@ pkgbase = fonttosfnt-git source = 0001-let-freetype-handle-ISO-8859-1-mapping.patch source = 0002-allow-ISO-646.1991-IRV-as-well-adobe-standard-for-bd.patch source = 0003-check-for-freetype-NULL-atoms.patch + source = 0004-improve-guess-font-size.patch md5sums = SKIP md5sums = c9a2934334f46681f1a6131d4fd13077 md5sums = 1b542636d9a95d9bb6095c12aa20eb3a md5sums = 9ba2b5498590e75859099cd57c970ac3 + md5sums = 1152c9c998813c003df379813aac2c7c pkgname = fonttosfnt-git diff --git a/0004-improve-guess-font-size.patch b/0004-improve-guess-font-size.patch new file mode 100644 index 000000000000..4c4a16008360 --- /dev/null +++ b/0004-improve-guess-font-size.patch @@ -0,0 +1,43 @@ +From 060c2bb9f84071246a69af49ee3dee90f8524cba Mon Sep 17 00:00:00 2001 +From: Peng Wu <alexepico@gmail.com> +Date: Wed, 9 Oct 2019 14:20:22 +0800 +Subject: [PATCH] Improve guess font size when read bitmap font + +--- + read.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/read.c b/read.c +index 632c7e7..915fa86 100644 +--- a/read.c ++++ b/read.c +@@ -238,20 +238,20 @@ readFile(char *filename, FontPtr font) + if(verbose_flag) + fprintf(stderr, "size %d: %dx%d\n", + i, +- (int)(face->available_sizes[i].x_ppem >> 6), +- (int)(face->available_sizes[i].y_ppem >> 6)); ++ (int)((face->available_sizes[i].x_ppem + 32) >> 6), ++ (int)((face->available_sizes[i].y_ppem + 32) >> 6)); + + rc = FT_Set_Pixel_Sizes(face, +- face->available_sizes[i].x_ppem >> 6, +- face->available_sizes[i].y_ppem >> 6); ++ (face->available_sizes[i].x_ppem + 32) >> 6, ++ (face->available_sizes[i].y_ppem + 32) >> 6); + if(rc != 0) { + fprintf(stderr, "Couldn't set size.\n"); + return -1; + } + + strike = makeStrike(font, +- face->available_sizes[i].x_ppem >> 6, +- face->available_sizes[i].y_ppem >> 6); ++ (face->available_sizes[i].x_ppem + 32) >> 6, ++ (face->available_sizes[i].y_ppem + 32) >> 6); + if(strike == NULL) { + fprintf(stderr, "Couldn't allocate strike.\n"); + return -1; +-- +2.22.0 + @@ -14,11 +14,13 @@ conflicts=("${pkgname%-git}") source=('git+https://gitlab.freedesktop.org/xorg/app/fonttosfnt.git' '0001-let-freetype-handle-ISO-8859-1-mapping.patch' '0002-allow-ISO-646.1991-IRV-as-well-adobe-standard-for-bd.patch' - '0003-check-for-freetype-NULL-atoms.patch') + '0003-check-for-freetype-NULL-atoms.patch' + '0004-improve-guess-font-size.patch') md5sums=('SKIP' 'c9a2934334f46681f1a6131d4fd13077' '1b542636d9a95d9bb6095c12aa20eb3a' - '9ba2b5498590e75859099cd57c970ac3') + '9ba2b5498590e75859099cd57c970ac3' + '1152c9c998813c003df379813aac2c7c') pkgver() { cd "$srcdir/${pkgname%-git}" |