Summary: | media-fonts/terminus-font: OpenType bitmap font format | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergey 'L29Ah' Alirzaev <zl29ah> |
Component: | Current packages | Assignee: | Gentoo Fonts Team <fonts> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | alexander, jstein, slyfox |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=728228 https://bugs.gentoo.org/show_bug.cgi?id=728308 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | terminus-font-4.48.otb.patch |
Description
Sergey 'L29Ah' Alirzaev
2020-04-12 10:19:08 UTC
It appears to be very easy: --- terminus-font-4.48.ebuild 2020-05-12 22:58:31.000000000 +0100 +++ terminus-font-4.48-r1.ebuild 2020-05-12 22:58:31.000000000 +0100 @@ -3,3 +3,3 @@ -EAPI=6 +EAPI=7 @@ -14,4 +14,4 @@ SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" -IUSE="a-like-o +center-tilde distinct-l +pcf +pcf-unicode-only +psf quote +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="a-like-o +center-tilde distinct-l otf +pcf +pcf-unicode-only +psf quote ru-dv +ru-g ru-i ru-k" @@ -21,2 +21,3 @@ virtual/awk + otf? ( x11-apps/fonttosfnt ) pcf? ( x11-apps/bdftopcf )" @@ -68,2 +69,10 @@ [[ ${#args[@]} -gt 0 ]] && emake "${args[@]}" + + # Follow https://fedoraproject.org/wiki/BitmapFontConversion#Steps: + # build ".otf" (bitmap-only) fonts out of .bdf ones + if use otf; then + # use unicode only bitmaps + fonttosfnt -v -b -c -g 2 -m 2 -o Terminus.otb ter-u*n.bdf || die + fonttosfnt -v -b -c -g 2 -m 2 -o Terminus-Bold.otb ter-u*b.bdf || die + fi } @@ -87,2 +96,3 @@ + use otf && FONT_SUFFIX=otb font_src_install $ fc-list | fgrep Terminus /usr/share/fonts/terminus/Terminus-Bold.otb: Terminus:style=Bold /usr/share/fonts/terminus/Terminus.otb: Terminus:style=Regular /usr/share/fonts/terminus/ter-x18n.pcf.gz: xos4 Terminus:style=Regular ... And seems to work at least in Alacritty. Created attachment 638486 [details, diff]
terminus-font-4.48.otb.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e863a522b0d023696bbe3cd5b41268e7c0acad71 commit e863a522b0d023696bbe3cd5b41268e7c0acad71 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-06-14 13:24:27 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-06-14 13:29:32 +0000 media-fonts/terminus-font: install OpenType fonts with USE=otf Reported-by: Sergey 'L29Ah' Alirzaev Closes: https://bugs.gentoo.org/717206 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> media-fonts/terminus-font/metadata.xml | 3 + .../terminus-font/terminus-font-4.48-r1.ebuild | 101 +++++++++++++++++++++ 2 files changed, 104 insertions(+) Sergei, thank you! (In reply to Sergei Trofimovich from comment #1) > And seems to work at least in Alacritty. It works, but there is a spacing issue at font size 12. Same issue was discussed at [*], but it is not clear yet, what caused that. This could be a bug in media-libs/harfbuzz or x11-apps/fonttosfnt. [*] https://bugzilla.redhat.com/show_bug.cgi?id=1753295 (In reply to Alexander Tsoy from comment #4) > ... but it is not clear yet, what caused that. This could be a > bug in media-libs/harfbuzz or x11-apps/fonttosfnt. bug #728308 (In reply to Alexander Tsoy from comment #5) > (In reply to Alexander Tsoy from comment #4) > > ... but it is not clear yet, what caused that. This could be a > > bug in media-libs/harfbuzz or x11-apps/fonttosfnt. > bug #728308 Thank you! Yeah, wading through all the issues around cairo/pango/harfbuzz and bitmap font conversion my impression was that font conversion will not be 1-1 perfect. The perfect solution would be to provide OTF fonts directly by terminus upstream. I sent an email upstream to see if it's feasible or if possible document a canonical way to convert the fonts to OpenType. |