diff --git a/.gitignore b/.gitignore
index 9c25677..33bc0b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,5 +20,3 @@ terminus-font-4.30-ij1.diff.gz
/terminus-font-4.46.tar.gz
/terminus-font-4.47.tar.gz
/terminus-font-4.48.tar.gz
-/terminus-font-4.49.tar.gz
-/terminus-font-4.49.1.tar.gz
diff --git a/63-terminus-fonts.conf b/63-terminus-fonts.conf
deleted file mode 100644
index 1f6afa5..0000000
--- a/63-terminus-fonts.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- monospace
-
- Terminus
-
-
-
- Terminus
-
- monospace
-
-
-
diff --git a/bitmapfonts2otb.py b/bitmapfonts2otb.py
index aa2642b..f98860a 100644
--- a/bitmapfonts2otb.py
+++ b/bitmapfonts2otb.py
@@ -1,71 +1,62 @@
#!/usr/bin/python3
-# This script is licensed under the GPL-3.0-or-later license.
-
# Automatically group the font files by family names and style names,
# and assume each bitmap font only contains one font face.
+#
+# Generates one otb file per (family name, style name) tuple, named
+# after the tuple.
+#
# This tool requires ftdump and fonttosfnt.
-# Some changes by Hans Ulrich Niedermann and Antonio Larrosa.
-
# Written by Peng Wu as
-# https://pwu.fedorapeople.org/fonts/convertbitmap/convertfont2.py
+# https://pwu.fedorapeople.org/fonts/convertbitmap/convertfont.py
# Some changes by Hans Ulrich Niedermann.
-import re
import sys
import subprocess
usage = '''
-convertfont2.py [BITMAPFONTFILE]...
+bitmapfonts2otb.py [BITMAPFONTFILE]...
'''
fontnames = dict()
# get font family name and style name by ftdump
-def get_fullname_height(fontname):
+def getfullname(fontname):
output = subprocess.check_output(['ftdump', fontname])
output = output.decode('utf8')
# only contain one font face
assert not 'Face number: 1' in output
result = {}
- height = 0
for row in output.split('\n'):
- # for family name and style name
if ':' in row:
key, value = row.split(': ')
result[key.strip()] = value.strip()
- # for height
- if 'height' in row:
- match = re.search('height (\d+)', row)
- height = int(match.group(1))
- assert height > 0
familyname, stylename = result['family'], result['style']
if stylename == 'Regular':
- return (familyname, height)
+ return familyname
else:
- return (familyname + ' ' + stylename, height)
+ return familyname + ' ' + stylename
def generate_fonts():
- for (fullname, height), filenames in fontnames.items():
- outputfilename = fullname.replace(' ', '-') + '-' + str(height) + '.otb'
- argv = 'fonttosfnt -b -c -g 2 -m 2 -o'.split(' ')
- argv.append(outputfilename)
+ for fullname, filenames in fontnames.items():
+ outputfilename = fullname.replace(' ', '-') + '.otb'
+ argv = ['fonttosfnt', '-b', '-c', '-g', '2', '-m', '2', '-o', outputfilename ]
argv.extend(filenames)
+ print(outputfilename)
print(' '.join(argv))
print(subprocess.check_output(argv).decode('utf8'))
if __name__ == '__main__':
for bitmapfontname in sys.argv[1:]:
- (fullname, height) = get_fullname_height(bitmapfontname)
- index = (fullname, height)
- if index in fontnames:
- fontnames[index].append(bitmapfontname)
+ fullname = getfullname(bitmapfontname)
+ if fullname in fontnames:
+ fontnames[fullname].append(bitmapfontname)
else:
- fontnames[index] = [bitmapfontname]
+ fontnames[fullname] = [bitmapfontname]
generate_fonts()
diff --git a/changelog b/changelog
deleted file mode 100644
index 8628a46..0000000
--- a/changelog
+++ /dev/null
@@ -1,198 +0,0 @@
-* Sat Jul 23 2022 Fedora Release Engineering - 4.49.1-15
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Sat Jan 22 2022 Fedora Release Engineering - 4.49.1-14
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Fri Jul 23 2021 Fedora Release Engineering - 4.49.1-13
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Fri Feb 5 2021 Hans Ulrich Niedermann - 4.49.1-12
-- Move consolefonts from /lib to /usr/lib like kbd has done (#1925696)
-
-* Fri Feb 5 2021 Hans Ulrich Niedermann - 4.49.1-11
-- Add checks on wildcard names matching font files
-
-* Wed Feb 3 2021 Hans Ulrich Niedermann - 4.49.1-10.3
-- Use upstream's way of building *.otb OpenType bitmap font files (#1922893)
-
-* Wed Feb 3 2021 Hans Ulrich Niedermann - 4.49.1-10.2
-- Update to terminus-font-4.49.1, keeping our fonttosfnt *.otb generation (#1910955)
-
-* Wed Feb 3 2021 Hans Ulrich Niedermann - 4.48-10.1
-- Update otb conversion script and ship one *.otb file per font size
-
-* Fri Jan 29 2021 Hans Ulrich Niedermann - 4.48-10
-- Add BuildRequires: make
-- Add BuildRequires: fonttosfnt >= 1.2.1 (remove font weight workaround)
- Closes: https://src.fedoraproject.org/rpms/terminus-fonts/pull-request/3
-
-* Wed Jan 27 2021 Fedora Release Engineering - 4.48-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Wed Jul 29 2020 Fedora Release Engineering - 4.48-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Tue Jun 2 2020 Akira TAGOH - 4.48-7
-- Workaround wrong weight in Terminus.otb in fontconfig config file.
- Resolves: rhbz#1823637
-
-* Sat Apr 25 2020 Hans Ulrich Niedermann - 4.48-6
-- complete spec file rewrite based on spectemplate-fonts-1-full.spec
-- split off legacy PCF files into -legacy-x11 subpackage
-
-* Tue Apr 7 2020 Hans Ulrich Niedermann - 4.48-5
-- List *.otb files explicitly (without wildcards)
-- Updated package descriptions and spec comments for more accuracy
-
-* Wed Feb 5 2020 Peng Wu - 4.48-4
-- Use bitmapfonts2otb.py to combine bitmap fonts
-
-* Fri Jan 31 2020 Fedora Release Engineering - 4.48-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Fri Jan 3 2020 Hans Ulrich Niedermann - 4.48-2
-- Stop shipping VGA fonts in grub subpackage
-- Build OTB fonts for compatibility with pango >= 1.44 (#1748495)
-
-* Tue Aug 27 2019 Hans Ulrich Niedermann - 4.48-1
-- Update to upstream release terminus-font-4.48
-- Ship the Hebrew characters introduced by terminus-font-4.48
-
-* Sat Jul 27 2019 Fedora Release Engineering - 4.47-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Sun Feb 03 2019 Fedora Release Engineering - 4.47-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Sun Jan 27 2019 Hans Ulrich Niedermann - 4.47-4
-- Only build -grub2 subpackage when arch/dist actually has grub2
-- Address and silence rpmlint warnings
-
-* Tue Jan 15 2019 Hans Ulrich Niedermann - 4.47-3
-- Update to upstream release terminus-font-4.47
-
-* Tue Jan 15 2019 Hans Ulrich Niedermann - 4.46-3
-- Continue shipping the 8bit versions of *.pcf files (#1664054)
-
-* Tue Dec 18 2018 Hans Ulrich Niedermann - 4.46-2
-- Add grub2 subpackage with *.pf2 fonts
-
-* Tue Dec 18 2018 Hans Ulrich Niedermann - 4.46-1
-- Update to terminus-font-4.46
-
-* Sat Jul 14 2018 Fedora Release Engineering - 4.40-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Fri Feb 09 2018 Fedora Release Engineering - 4.40-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Thu Jul 27 2017 Fedora Release Engineering - 4.40-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Sat Feb 11 2017 Fedora Release Engineering - 4.40-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
-
-* Mon May 16 2016 Hans Ulrich Niedermann - 4.40-5
-- Fix terminus-fonts-console README.fedora instructions on checking the initramfs.
-
-* Fri Feb 05 2016 Fedora Release Engineering - 4.40-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-
-* Mon Jan 18 2016 Hans Ulrich Niedermann - 4.40-3
-- Fix spelling issue in %%description
-- iconv README-BG from WINDOWS-1251 to utf-8
-
-* Sun Jan 17 2016 Hans Ulrich Niedermann - 4.40-2
-- Update to terminus-font-4.40 (#1095285)
-
-* Fri Jun 19 2015 Fedora Release Engineering - 4.39-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-
-* Thu Jul 10 2014 Jens Petersen - 4.39-1
-- update to 4.39
-
-* Sun Jun 08 2014 Fedora Release Engineering - 4.38-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-
-* Thu Nov 28 2013 Hans Ulrich Niedermann - 4.38-3
-- Improve instructions for F18+ to console README.fedora (#1000491)
-
-* Sat Nov 16 2013 Hans Ulrich Niedermann - 4.38-2
-- Add instructions for F18+ to terminus-fonts-console README.fedora (#1000491)
-
-* Mon Sep 16 2013 Parag - 4.38-1
-- Update to new 4.38 version
-
-* Sun Aug 04 2013 Fedora Release Engineering - 4.36-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-
-* Fri Feb 15 2013 Fedora Release Engineering - 4.36-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
-
-* Sat Jul 21 2012 Fedora Release Engineering - 4.36-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
-
-* Sat Jan 14 2012 Fedora Release Engineering - 4.36-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Mon Sep 12 2011 Hans Ulrich Niedermann - 4.36-1
-- Update to terminus-font-4.36
-
-* Sat May 21 2011 Hans Ulrich Niedermann - 4.35-1
-- Update to terminus-font-4.35
-- Actually ship the size 18 fonts (upstream fix)
-
-* Mon May 2 2011 Hans Ulrich Niedermann - 4.34-1
-- Update to terminus-font-4.34
-- Remove patch for alt/ge1.diff (4.34 uses ge1 by default)
-
-* Wed Feb 09 2011 Fedora Release Engineering - 4.32-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Tue Feb 1 2011 Hans Ulrich Niedermann - 4.32-1
-- Update to 4.32
-
-* Fri Jul 16 2010 Hans Ulrich Niedermann - 4.30-2
-- Added License tag to -console subpackage.
-- Added note about rebuilding initramfs after changing /etc/sysconfig/i18n.
-- Changed URL, SourceN, PatchN to use new location at sourceforge.net.
-
-* Fri Dec 4 2009 Hans Ulrich Niedermann - 4.30-1
-- update to 4.30 release:
- - new size 22 (not very good)
- - 25 additional characters
- - various small fixes
-
-* Sun Jul 26 2009 Fedora Release Engineering - 4.28-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Wed Mar 25 2009 Hans Ulrich Niedermann - 4.28-8
-- Rebuild for Fedora 11 to pick up font autodeps (#491973)
-
-* Wed Feb 25 2009 Fedora Release Engineering - 4.28-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Fri Feb 20 2009 Hans Ulrich Niedermann - 4.28-6
-- fix fontpackages-devel requirement to >= 1.18 (for _fontdir ownership)
-
-* Fri Feb 20 2009 Hans Ulrich Niedermann - 4.28-5
-- Add information to the fontconfig file
-- no need to %%dir %%{_fontdir} in fontpackages-devel >= 1.20
-- Use %%{_sysconfdir} instead of /etc
-- Change all %%define instances to %%global
-- Drop filesystem requirement for F-10 and later
-- Use macro for common parts of descriptions
-- Remove unneeded Provides:
-- drop unnecessary comment
-
-* Thu Feb 19 2009 Hans Ulrich Niedermann - 4.28-4
-- change catalog(ue) spelling to US English
-- remove unnecessary macro definition of %%tarname
-- properly define consolefontdir (no macros)
-
-* Thu Feb 19 2009 Hans Ulrich Niedermann - 4.28-3
-- generate fonts.dir at build time (bug 483589)
-
-* Wed Feb 18 2009 Hans Ulrich Niedermann - 4.28-2
-- initial package for new Fedora Font Policy
diff --git a/font-card.txt b/font-card.txt
deleted file mode 100644
index 3d250bc..0000000
--- a/font-card.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-▌▗▖█ This is some ╔═╕ text for pango to render so
-▐▝▘ █▀▄ ▒ that we ╟┬┤ can see whether the bitmap
- font has been ╠╪╡ properly converted to the
- *.otb OpenType ╚╧╛ bitmap font file format.
diff --git a/generate-font-card b/generate-font-card
deleted file mode 100755
index 78e0423..0000000
--- a/generate-font-card
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/bash
-#
-# Render each and every font weight and size of the Terminus font to a
-# single PNG file to allow one at a glance checking that the font has
-# been converted correctly.
-#
-# Requirements:
-# * pango-view to render text to bitmaps
-# * ImageMagick (for identify and montage)
-
-set -e
-
-scriptdir="$(cd "$(dirname "$0")" && pwd)"
-imgbaseroot="terminus-font-card"
-
-# Default values
-default_identify="/usr/bin/identify"
-default_montage="/usr/bin/montage"
-default_pv="/usr/bin/pango-view"
-default_text_file="${scriptdir}/font-card.txt"
-
-# Unless set explictly, use default value
-MONTAGE="${MONTAGE:=${default_montage}}"
-IDENTIFY="${IDENTIFY:=${default_identify}}"
-PV="${PV:=${default_pv}}"
-TEXTFILE="${TEXTFILE:=${default_text_file}}"
-
-print_args() {
- echo "Argument list:"
- for arg
- do
- echo " * <<${arg}>>"
- done
-}
-
-run() {
- local fontname="${1:?No fontname given}"
- local fontsize="${2:?No fontsize given}"
- local image_fname="${3:?No image_fname given}"
-
- local PV_CMD=(${PV})
-
- # PV_CMD+=("--annotate=1")
- # PV_CMD+=("--annotate=2")
- # PV_CMD+=("--annotate=3")
-
- PV_CMD+=("--no-display")
- # PV_CMD+=("--single-par")
- PV_CMD+=("--language=C")
- # PV_CMD+=("--pixels")
- PV_CMD+=("--font=${fontname} ${fontsize}")
-
- PV_CMD+=("${TEXTFILE}")
-
- PV_CMD+=("--output=${image_fname}")
- IMAGE_LIST+=("${image_fname}")
-
- print_args "${PV_CMD[@]}"
- "${PV_CMD[@]}"
-
- file "${image_fname}"
-}
-
-
-width=480
-height=120
-
-MONTAGE_CMD=(${MONTAGE})
-IMAGE_LIST=()
-FONT_SIZES=(12 14 16 18 20 22 24 28 32)
-FONT_NAMES=("Terminus Medium" "Terminus Bold")
-FONT_NAMES=("Terminus" "Terminus Bold")
-for fontsize in "${FONT_SIZES[@]}"
-do
- for fontname in "${FONT_NAMES[@]}"
- do
- image_fname="${scriptdir}/${imgbaseroot}--${fontname}-${fontsize}.png"
- run "$fontname" "$fontsize" "$image_fname"
- MONTAGE_CMD+=(-label "${fontname} ${fontsize} ($(${IDENTIFY} -format "%[fx:w]x%[fx:h]" "${image_fname}"))")
- MONTAGE_CMD+=("$image_fname")
- MONTAGE_CMD+=(-repage "${width}x${height}>")
- MONTAGE_CMD+=(-crop "${width}x${height}>")
- done
-done
-
-echo "Images: ${IMAGE_LIST[@]}"
-
-montage_fname="${scriptdir}/${imgbaseroot}.png"
-MONTAGE_CMD+=(-tile "${#FONT_NAMES[@]}x${#FONT_SIZES[@]}")
-MONTAGE_CMD+=(-frame 5)
-MONTAGE_CMD+=(-geometry "${width}x${height}<+2+2>")
-MONTAGE_CMD+=(${montage_fname})
-
-print_args "${MONTAGE_CMD[@]}"
-"${MONTAGE_CMD[@]}"
-
-file "$montage_fname"
-
-# End of file.
diff --git a/sources b/sources
index 7abed12..3851aad 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (terminus-font-4.49.1.tar.gz) = 2e3a99960c459a453b5879bebbebeb653f0a22060177bf75c67bbeb7d32cfe1acce9e74a88fdc42e299b6dc402e0708552487abd26e80e985c7d6059b0d445a8
+SHA512 (terminus-font-4.48.tar.gz) = 5f45f7d0e7396f02158f4751aaafb3f0a3fb68dbe3e5501f86a5138c6d52f5106053e38c368d560e5979e29250074dbde5165702b8905a564d029663a2219af4
diff --git a/terminus-font-opentype-bitmap-via-fonttosfnt.patch b/terminus-font-opentype-bitmap-via-fonttosfnt.patch
new file mode 100644
index 0000000..9cd8dc5
--- /dev/null
+++ b/terminus-font-opentype-bitmap-via-fonttosfnt.patch
@@ -0,0 +1,57 @@
+Index: terminus-font-4.48/Makefile
+===================================================================
+--- terminus-font-4.48.orig/Makefile
++++ terminus-font-4.48/Makefile
+@@ -1,3 +1,4 @@
++INSTALL = install
+ INT = python3
+ EXT = py
+ BIN = ./bin
+@@ -5,8 +6,11 @@ BIN = ./bin
+ UCS2ANY = $(INT) $(BIN)/ucstoany.$(EXT)
+ BDF2PSF = $(INT) $(BIN)/bdftopsf.$(EXT)
+ UCS2X11 = $(INT) $(BIN)/ucstoany.$(EXT) -f
++BDF2OTB = $(INT) $(BIN)/bitmapfonts2otb.$(EXT)
+ BDF2PCF = bdftopcf
+
++BDF = ter-u12b.bdf ter-u14v.bdf ter-u18b.bdf ter-u22b.bdf ter-u28b.bdf ter-u12n.bdf ter-u16b.bdf ter-u18n.bdf ter-u22n.bdf ter-u28n.bdf ter-u14b.bdf ter-u16n.bdf ter-u20b.bdf ter-u24b.bdf ter-u32b.bdf ter-u14n.bdf ter-u16v.bdf ter-u20n.bdf ter-u24n.bdf ter-u32n.bdf
++
+ REG_8859_1 = ISO8859 1
+ REG_8859_2 = ISO8859 2
+ REG_8859_5 = ISO8859 5
+@@ -211,6 +215,27 @@ install-psf-ref: README
+ uninstall-psf-ref:
+ rm -f $(DESTDIR)$(psfref)
+
++# OpenType Bitmap fonts (OTB)
++
++OTB = Terminus.otb Terminus-Bold.otb
++
++$(OTB): $(BDF)
++ $(BDF2OTB) $(BDF)
++
++.PHONY: otb
++otb: $(OTB)
++
++otbdir = $(x11dir)
++
++.PHONY: install-otb
++install-otb: $(OTB)
++ $(INSTALL) -m 0755 -d "$(DESTDIR)$(otbdir)"
++ $(INSTALL) -m 0644 -t "$(DESTDIR)$(otbdir)" $(OTB)
++
++.PHONY: uninstall-otb
++uninstall-otb:
++ @set -x; if test -d "$(DESTDIR)$(otbdir)"; then cd "$(DESTDIR)$(otbdir)" && rm -f $(OTB); fi
++
+ # X11 Window System
+
+ X11_8859_1 = uni/x11gr.uni uni/ascii-h.uni uni/win-1252.uni
+@@ -291,6 +316,6 @@ uninstall-pcf-8bit:
+ # Cleanup
+
+ clean:
+- rm -f $(PSF) $(PSF_VGAW) $(PCF) $(PCF_8BIT) $(FNT)
++ rm -f $(PSF) $(PSF_VGAW) $(PCF) $(PCF_8BIT) $(FNT) $(OTB)
+
+ .PHONY: all install uninstall fontdir psf install-psf uninstall-psf psf-vgaw install-psf-vgaw uninstall-psf-vgaw install-psf-ref uninstall-psf-ref pcf install-pcf uninstall-pcf pcf-8bit install-pcf-8bit uninstall-pcf-8bit clean
diff --git a/terminus-fonts-README.fedora b/terminus-fonts-README.fedora
deleted file mode 100644
index 1dff9c1..0000000
--- a/terminus-fonts-README.fedora
+++ /dev/null
@@ -1,14 +0,0 @@
-========================================================================
-User Information for the Fedora **terminus-fonts** package
-========================================================================
-
-For most contemporary software, the **terminus-fonts** package will
-provide the Terminus font in the modern OpenType bitmap format.
-
-However, as of 2020-04, there is still software in widespread use
-which cannot use fonts in OpenType bitmap format like e.g. GNU Emacs
-26.
-
-If you want to use one of these software packges, you need to install
-the **terminus-fonts-legacy-x11** package to install the Terminus font
-in the legacy PCF format.
diff --git a/terminus-fonts-console-README.fedora b/terminus-fonts-console.README.fedora
similarity index 97%
rename from terminus-fonts-console-README.fedora
rename to terminus-fonts-console.README.fedora
index 3f8caf8..a63a512 100644
--- a/terminus-fonts-console-README.fedora
+++ b/terminus-fonts-console.README.fedora
@@ -1,5 +1,5 @@
========================================================================
-User Information for the Fedora **terminus-fonts-console** package
+User Information for the Fedora terminus-font-console package
========================================================================
The console package just dumps the font files in the directory where
diff --git a/terminus-fonts-fontconfig.conf b/terminus-fonts-fontconfig.conf
new file mode 100644
index 0000000..d15a34e
--- /dev/null
+++ b/terminus-fonts-fontconfig.conf
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ Terminus
+
+
+ Regular
+
+
+ medium
+
+
+ regular
+
+
+
+
+ monospace
+
+ Terminus
+
+
+
+ Terminus
+
+ monospace
+
+
+
diff --git a/terminus-fonts-legacy-x11-README.fedora b/terminus-fonts-legacy-x11-README.fedora
deleted file mode 100644
index e4fb638..0000000
--- a/terminus-fonts-legacy-x11-README.fedora
+++ /dev/null
@@ -1,15 +0,0 @@
-========================================================================
-User Information for the Fedora **terminus-fonts-legacy-x11** package
-========================================================================
-
-The **terminus-fonts-legacy-x11** package registers the Terminus font
-with both fonts-conf(5) and the newer /etc/X11/fontpath.d mechanism
-used by newer libXfont and xfs(1) versions.
-
-This makes the font available for both
-
- * traditional programs using libXfont or xfs (like xterm, xfontsel,
- and older GNU Emacs)
-
- * slightly more modern programs using fontconfig but not OpenType
- yet (like GNU Emacs 26).
diff --git a/terminus-fonts.README.fedora b/terminus-fonts.README.fedora
new file mode 100644
index 0000000..e903b2b
--- /dev/null
+++ b/terminus-fonts.README.fedora
@@ -0,0 +1,11 @@
+========================================================================
+User Information for the Fedora terminus-font-x11 package
+========================================================================
+
+The terminus-font-x11 package registers the Terminus font with both
+fonts-conf(5) and the newer /etc/X11/fontpath.d mechanism used by newer
+libXfont and xfs(1) versions.
+
+This makes the font available for both traditional programs using
+libXfont or xfs (like xterm, xfontsel, emacs) and for modern programs
+using fontconfig (like Gnome and KDE programs).
diff --git a/terminus-fonts-Xresources.example b/terminus-fonts.Xresources.example
similarity index 100%
rename from terminus-fonts-Xresources.example
rename to terminus-fonts.Xresources.example
diff --git a/terminus-fonts.rpmlintrc b/terminus-fonts.rpmlintrc
index 783c0a9..1acd11a 100644
--- a/terminus-fonts.rpmlintrc
+++ b/terminus-fonts.rpmlintrc
@@ -1,4 +1,5 @@
# -*- python -*-
+addFilter(r'hidden-file-or-dir /usr/share/fonts/terminus/.uuid')
+addFilter(r'non-readable /usr/share/fonts/terminus/.uuid 0')
addFilter(r'hardcoded-library-path in /lib/kbd/consolefonts')
-addFilter(r'configure-without-libdir-spec')
diff --git a/terminus-fonts.spec b/terminus-fonts.spec
index cf39623..9a4354e 100644
--- a/terminus-fonts.spec
+++ b/terminus-fonts.spec
@@ -1,49 +1,34 @@
-########################################################################
-# Top definitions from spectemplate-fonts-1-full.spec
-########################################################################
+%global fontname terminus
+%global fontconf 63-%{fontname}.conf
-Version: 4.49.1
-Release: %autorelease -b 6
-URL: http://terminus-font.sourceforge.net/
+%global archivename terminus-font-%{version}
-%global foundry %{nil}
-%global fontlicense OFL-1.1
-#
-# The following directives are lists of space-separated shell globs
-# – matching files associated with the font family,
-# – as they exist in the build root,
-# — at the end of the %%build stage:
-# – legal files (licensing…)
-%global fontlicenses OFL.TXT
-# – exclusions from the “fontlicenses” list
-%global fontlicensesex %{nil}
-# – documentation files
-%global fontdocs README README-BG docs/README.fedora
-# – exclusions from the “fontdocs” list
-%global fontdocsex %{fontlicenses}
-%global fontfamily terminus
-%global fontsummary Clean fixed width font
-# A container for additional subpackage declarations.
-%global fontpkgheader %{expand:
-#Obsoletes:
-}
+# This is the directory where we install our console fonts.
+# Owned by the kbd package, which hardcodes it as /lib/kbd (without macros).
+%global consolefontdir /lib/kbd/consolefonts
+
+
+# The ExcludeArch from the grub2.spec file
#
-# More shell glob lists:
-# – font family files
-%global fonts ter-*.otb
-# – exclusions from the “fonts” list)
-%global fontsex %{nil}
-# – fontconfig files
-%global fontconfs %{SOURCE10}
-# – exclusions from the “fontconfs” list
-%global fontconfsex %{nil}
-# – appstream files, if any (generated automatically otherwise)
-%global fontappstreams %{nil}
-# – exclusions from the “fontappstreams” list
-%global fontappstreamsex %{nil}
-#
-%global fontdescription %{expand:
+# There might be a better way to detect whether this platform has
+# grub2 available, but this should do the job at least for the time
+# being.
+%if 0%{?fedora} >= 29
+%global grub2_exclude_arches s390 s390x
+%else
+%global grub2_exclude_arches s390 s390x %{arm}
+%endif
+
+# Owned by the grub2-common package
+%global grub2fontdir /usr/share/grub
+
+
+# Font catalog
+%global catalog %{_sysconfdir}/X11/fontpath.d
+
+
+%global common_desc \
The Terminus Font is a clean, fixed with bitmap font designed for long\
(8 and more hours per day) work with computers.\
\
@@ -55,46 +40,7 @@ the IBM VGA, vt100 and xterm pseudo graphic characters.\
The sizes present are 6x12, 8x14, 8x16, 10x18, 10x20, 11x22, 12x24,\
14x28, and 16x32. The weights are normal and bold (except for 6x12),\
plus CRT VGA-bold for 8x14 and 8x16.
-}
-########################################################################
-# Local macro definitions (i.e. not from spectemplate-fonts-1-full.spec)
-########################################################################
-
-# The basename for upstream's source tarball
-%global archivename terminus-font-%{version}
-
-# Copied from the kbd package.
-# The %%{_exec_prefix}/lib part is correct even on x86_64.
-# This is where kbd data files (like console fonts) are installed.
-# No static libraries, shared objects, or executables are placed here.
-%global kbddir %{_exec_prefix}/lib/kbd
-
-# This is the directory for the actualy console fonts.
-%global console_fontdir %{kbddir}/consolefonts
-
-# The ExcludeArch from the grub2.spec file
-#
-# There might be a better way to detect whether this platform has
-# grub2 available, but this should do the job at least for the time
-# being.
-%if 0%{?fedora} >= 36
-%global grub2_exclude_arches s390 s390x %{ix86}
-%else
-%if 0%{?fedora} >= 29
-%global grub2_exclude_arches s390 s390x
-%else
-%global grub2_exclude_arches s390 s390x %{arm}
-%endif
-%endif
-
-# Owned by the grub2-common package
-%global grub2_fontdir /usr/share/grub
-
-%global legacy_x11_fontdir /usr/share/fonts/terminus-fonts-legacy-x11
-
-# Font catalog
-%global catalog %{_sysconfdir}/X11/fontpath.d
%if %{?epoch: 1}%{?!epoch: 0}
%global evr %{epoch}:%{version}-%{release}
@@ -102,93 +48,93 @@ plus CRT VGA-bold for 8x14 and 8x16.
%global evr %{version}-%{release}
%endif
+Name: %{fontname}-fonts
+Version: 4.48
+Release: 7%{?dist}
+Summary: Clean fixed width font
-# From spectemplate-fonts-1-full.spec
-Source0: https://downloads.sourceforge.net/terminus-font/%{archivename}.tar.gz
-Source10: 63-%{fontpkgname}.conf
+# The source package also contains a few GPLv2+ build helper scripts.
+License: OFL
+URL: http://terminus-font.sourceforge.net/
+Source0: http://downloads.sourceforge.net/terminus-font/%{archivename}.tar.gz
+Source1: %{name}-fontconfig.conf
+Source2: bitmapfonts2otb.py
+Source10: %{name}-console.README.fedora
+Source20: %{name}.README.fedora
+Source21: %{name}.Xresources.example
-# Local definitions
-Source21: %{name}-console-README.fedora
-Source22: %{name}-legacy-x11-README.fedora
-Source23: %{name}-Xresources.example
-Source24: %{name}-README.fedora
+Patch42: terminus-font-opentype-bitmap-via-fonttosfnt.patch
-# For generating *.otb (OpenType bitmap font) files
-Source42: bitmapfonts2otb.py
-BuildRequires: make
-BuildRequires: /usr/bin/ftdump
-BuildRequires: python3 > 3.5.0
+BuildArch: noarch
+BuildRequires: fontpackages-devel >= 1.18
+Requires: fontpackages-filesystem
-# For generating legacy fonts (*.pcf)
-BuildRequires: /usr/bin/bdftopcf
-BuildRequires: mkfontdir
+Obsoletes: terminus-font-x11 < 4.28-2
+Provides: terminus-font-x11 = %{evr}
+# For generating *.otb (OpenType bitmap font)
+BuildRequires: /usr/bin/ftdump
+BuildRequires: /usr/bin/fonttosfnt
+BuildRequires: python3
-ExcludeArch: %{grub2_exclude_arches}
-BuildRequires: /usr/bin/grub2-mkfont
+BuildRequires: python3 >= 3.5.0
+BuildRequires: /usr/bin/bdftopcf
+BuildRequires: /usr/bin/mkfontdir
+%ifnarch %{grub2_exclude_arches}
+BuildRequires: /usr/bin/grub2-mkfont
+%endif
-%fontpkg
+%description
+%common_desc
+
+This package contains the OpenType bitmap fonts to use with
+X11 and Wayland on Fedora 31 and later, and also the legacy
+X11 PCF bitmap fonts for compatibility with older software.
%package console
-Requires: kbd
-# For /usr/lib/kbd
-Requires: kbd-misc
-Summary: Clean fixed width font (console version)
-License: OFL-1.1
+Requires: kbd
+Summary: Clean fixed width font (console version)
+Obsoletes: terminus-font-console < 4.28-2
+Provides: terminus-font-console = %{evr}
+License: OFL
%description console
-%fontdescription
+%common_desc
+
This package contains the fonts to use with the Linux console.
%ifnarch %{grub2_exclude_arches}
%package grub2
-Requires: grub2-common
-Summary: Clean fixed width font (grub2 version)
-License: OFL-1.1
+Requires: grub2-common
+Summary: Clean fixed width font (grub2 version)
+License: OFL
%description grub2
-%fontdescription
+%common_desc
+
This package contains the fonts to use with the grub2 boot loader.
%endif
-%package legacy-x11
-Summary: Clean fixed width font (legacy PCF version)
-License: OFL-1.1
-# Require the fontconfig file
-Requires: %{name} = %{evr}
-
-%description legacy-x11
-%fontdescription
-This package contains the font variants to use with software still
-relying on legacy PCF font rendering methods (e.g. GNU Emacs 26).
-
-
%prep
%setup -q -n %{archivename}
-# Convert upstream files to UTF-8 and Unix end of lines if necessary
-# Optional arguments:
-# -e [encoding] source OS encoding (auto-detected otherwise)
-# -n do not recode files, only adjust folding and end of lines
-#linuxtext *.txt
-cp -p "%{SOURCE42}" bin/
-patch -s -p1 -b --suffix .br1 -fuzz=0 -i alt/br1.diff
+cp -p "%{SOURCE2}" ./bin
+%patch42 -p1 -b .opentype-bitmap-via-fonttosfnt
patch -s -p1 -b --suffix .dv1 -fuzz=0 -i alt/dv1.diff
patch -s -p1 -b --suffix .ij1 -fuzz=0 -i alt/ij1.diff
-patch -s -p1 -b --suffix .td1 -fuzz=0 -i alt/td1.diff
+chmod 755 configure
iconv -f WINDOWS-1251 -t utf-8 -o README-BG README-BG
-
%build
-./configure --prefix=%{_prefix} \
- --x11dir=%{legacy_x11_fontdir} --psfdir=%{console_fontdir}
+# The libdir is just to shut up rpmlint. Configure is nice enough to
+# just ignore it.
+./configure --prefix=%{_prefix} --libdir=%{_libdir} \
+ --x11dir=%{_fontdir} --psfdir=%{consolefontdir}
env GZIP=--best make %{?_smp_mflags} PCF='$(PCF_10646_1) $(PCF_8BIT)' pcf psf psf-vgaw otb
-ls -l *.otb
-
%ifnarch %{grub2_exclude_arches}
# generate *.pf2 for the grub2 bootloader
for bdf in ter-*[bn].bdf; do
@@ -197,630 +143,503 @@ done
%endif
# Fedora specific docs and examples
-mkdir -p docs/console docs/legacy-x11
-cp -p "%{SOURCE21}" docs/console/README.fedora
-cp -p "%{SOURCE22}" docs/legacy-x11/README.fedora
-cp -p "%{SOURCE23}" docs/legacy-x11/Xresources.example
-cp -p "%{SOURCE24}" docs/README.fedora
-
-%fontbuild
+mkdir -p docs/console docs/x11
+cp -p "%{SOURCE10}" docs/console/README.fedora
+cp -p "%{SOURCE20}" docs/x11/README.fedora
+cp -p "%{SOURCE21}" docs/x11/Xresources.example
%install
-make DESTDIR="%{buildroot}" PCF='$(PCF_10646_1) $(PCF_8BIT)' install-psf install-psf-ref install-psf-vgaw install-pcf
+make DESTDIR="%{buildroot}" PCF='$(PCF_10646_1) $(PCF_8BIT)' install-psf install-psf-ref install-psf-vgaw install-pcf install-otb
%ifnarch %{grub2_exclude_arches}
# install *.pf2 for the grub2 bootloader
-install -m 0755 -d %{buildroot}%{grub2_fontdir}
-install -m 0644 -t %{buildroot}%{grub2_fontdir} ter-*.pf2
+install -m 0755 -d %{buildroot}%{grub2fontdir}
+install -m 0644 -t %{buildroot}%{grub2fontdir} ter-*.pf2
%endif
+# hook the OTB and legacy PCF fonts into fontconfig
+install -m 0755 -d \
+ %{buildroot}%{_fontconfig_templatedir} \
+ %{buildroot}%{_fontconfig_confdir}
+
+install -m 0644 -p %{SOURCE1} \
+ %{buildroot}%{_fontconfig_templatedir}/%{fontconf}
+ln -s \
+ %{_fontconfig_templatedir}/%{fontconf} \
+ %{buildroot}%{_fontconfig_confdir}/%{fontconf}
+
# We cannot run mkfontdir in %%post because %%post is generated by %%_font_pkg
install -m 0755 -d %{buildroot}%{catalog}
-
-ln -s "$(echo '%{catalog}/%{fontfamily}:unscaled' | sed -e 's|[^/]||g' -e 's|/|../|g' -e 's|/../$||')%{legacy_x11_fontdir}" "%{buildroot}%{catalog}/%{fontfamily}:unscaled"
-test -d "%{buildroot}%{catalog}/%{fontfamily}:unscaled/"
-
-mkfontdir %{buildroot}%{legacy_x11_fontdir}
-test -f "%{buildroot}%{catalog}/%{fontfamily}:unscaled/fonts.dir"
-
-# Check automatic fonts do not contain unmatched wildcards
-font_counter=0
-for fntfile in %{fonts}
-do
- if test -f "${fntfile}"; then
- font_counter="$(expr "${font_counter}" + 1)"
- else
- echo "Missing font file or wildcard: ${fntfile}"
- exit 2
- fi
-done
-
-# Check automatic fonts are a potentially valid number of files
-if test "$font_counter" -lt 18 || test "$font_counter" -gt 18
-then
- echo "Weird number of font files: $font_counter"
- exit 2
-fi
-
-%fontinstall
-
-cat< - 4.48-7
+- Workaround wrong weight in Terminus.otb in fontconfig config file.
+ Resolves: rhbz#1823637
+
+* Tue Apr 7 2020 Hans Ulrich Niedermann - 4.48-5
+- List *.otb files explicitly (without wildcards)
+- Updated package descriptions and spec comments for more accuracy
+
+* Wed Feb 5 2020 Peng Wu - 4.48-4
+- Use bitmapfonts2otb.py to combine bitmap fonts
+
+* Fri Jan 31 2020 Fedora Release Engineering - 4.48-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Fri Jan 3 2020 Hans Ulrich Niedermann - 4.48-2
+- Stop shipping VGA fonts in grub subpackage
+- Build OTB fonts for compatibility with pango >= 1.44 (#1748495)
+
+* Tue Aug 27 2019 Hans Ulrich Niedermann - 4.48-1
+- Update to upstream release terminus-font-4.48
+- Ship the Hebrew characters introduced by terminus-font-4.48
+
+* Sat Jul 27 2019 Fedora Release Engineering - 4.47-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Sun Feb 03 2019 Fedora Release Engineering - 4.47-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Sun Jan 27 2019 Hans Ulrich Niedermann - 4.47-4
+- Only build -grub2 subpackage when arch/dist actually has grub2
+- Address and silence rpmlint warnings
+
+* Tue Jan 15 2019 Hans Ulrich Niedermann - 4.47-3
+- Update to upstream release terminus-font-4.47
+
+* Tue Jan 15 2019 Hans Ulrich Niedermann - 4.46-3
+- Continue shipping the 8bit versions of *.pcf files (#1664054)
+
+* Tue Dec 18 2018 Hans Ulrich Niedermann - 4.46-2
+- Add grub2 subpackage with *.pf2 fonts
+
+* Tue Dec 18 2018 Hans Ulrich Niedermann - 4.46-1
+- Update to terminus-font-4.46
+
+* Sat Jul 14 2018 Fedora Release Engineering - 4.40-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Fri Feb 09 2018 Fedora Release Engineering - 4.40-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Thu Jul 27 2017 Fedora Release Engineering - 4.40-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
+* Sat Feb 11 2017 Fedora Release Engineering - 4.40-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Mon May 16 2016 Hans Ulrich Niedermann - 4.40-5
+- Fix terminus-fonts-console README.fedora instructions on checking the initramfs.
+
+* Fri Feb 05 2016 Fedora Release Engineering - 4.40-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Mon Jan 18 2016 Hans Ulrich Niedermann - 4.40-3
+- Fix spelling issue in %%description
+- iconv README-BG from WINDOWS-1251 to utf-8
+
+* Sun Jan 17 2016 Hans Ulrich Niedermann - 4.40-2
+- Update to terminus-font-4.40 (#1095285)
+
+* Fri Jun 19 2015 Fedora Release Engineering - 4.39-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
+
+* Thu Jul 10 2014 Jens Petersen - 4.39-1
+- update to 4.39
+
+* Sun Jun 08 2014 Fedora Release Engineering - 4.38-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Thu Nov 28 2013 Hans Ulrich Niedermann - 4.38-3
+- Improve instructions for F18+ to console README.fedora (#1000491)
+
+* Sat Nov 16 2013 Hans Ulrich Niedermann - 4.38-2
+- Add instructions for F18+ to terminus-fonts-console README.fedora (#1000491)
+
+* Mon Sep 16 2013 Parag - 4.38-1
+- Update to new 4.38 version
+
+* Sun Aug 04 2013 Fedora Release Engineering - 4.36-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Fri Feb 15 2013 Fedora Release Engineering - 4.36-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Sat Jul 21 2012 Fedora Release Engineering - 4.36-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Sat Jan 14 2012 Fedora Release Engineering - 4.36-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Mon Sep 12 2011 Hans Ulrich Niedermann - 4.36-1
+- Update to terminus-font-4.36
+
+* Sat May 21 2011 Hans Ulrich Niedermann - 4.35-1
+- Update to terminus-font-4.35
+- Actually ship the size 18 fonts (upstream fix)
+
+* Mon May 2 2011 Hans Ulrich Niedermann - 4.34-1
+- Update to terminus-font-4.34
+- Remove patch for alt/ge1.diff (4.34 uses ge1 by default)
+
+* Wed Feb 09 2011 Fedora Release Engineering - 4.32-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Tue Feb 1 2011 Hans Ulrich Niedermann - 4.32-1
+- Update to 4.32
+
+* Fri Jul 16 2010 Hans Ulrich Niedermann - 4.30-2
+- Added License tag to -console subpackage.
+- Added note about rebuilding initramfs after changing /etc/sysconfig/i18n.
+- Changed URL, SourceN, PatchN to use new location at sourceforge.net.
+
+* Fri Dec 4 2009 Hans Ulrich Niedermann - 4.30-1
+- update to 4.30 release:
+ - new size 22 (not very good)
+ - 25 additional characters
+ - various small fixes
+
+* Sun Jul 26 2009 Fedora Release Engineering - 4.28-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Wed Mar 25 2009 Hans Ulrich Niedermann - 4.28-8
+- Rebuild for Fedora 11 to pick up font autodeps (#491973)
+
+* Wed Feb 25 2009 Fedora Release Engineering - 4.28-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Fri Feb 20 2009 Hans Ulrich Niedermann - 4.28-6
+- fix fontpackages-devel requirement to >= 1.18 (for _fontdir ownership)
+
+* Fri Feb 20 2009 Hans Ulrich Niedermann - 4.28-5
+- Add information to the fontconfig file
+- no need to %%dir %%{_fontdir} in fontpackages-devel >= 1.20
+- Use %%{_sysconfdir} instead of /etc
+- Change all %%define instances to %%global
+- Drop filesystem requirement for F-10 and later
+- Use macro for common parts of descriptions
+- Remove unneeded Provides:
+- drop unnecessary comment
+
+* Thu Feb 19 2009 Hans Ulrich Niedermann - 4.28-4
+- change catalog(ue) spelling to US English
+- remove unnecessary macro definition of %%tarname
+- properly define consolefontdir (no macros)
+
+* Thu Feb 19 2009 Hans Ulrich Niedermann - 4.28-3
+- generate fonts.dir at build time (bug 483589)
+
+* Wed Feb 18 2009 Hans Ulrich Niedermann - 4.28-2
+- initial package for new Fedora Font Policy