#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global flavor %{nil}
%if "%{flavor}" == "converted"
%define pkgflavor -converted
%else
%define pkgflavor %{nil}
%endif

Name:           xorg-x11-fonts%{pkgflavor}
BuildRequires:  pkgconfig
URL:            http://xorg.freedesktop.org/
Version:        7.6
Release:        45.1
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        X.Org fonts
License:        MIT
Group:          System/X11/Fonts
Source0:        http://xorg.freedesktop.org/archive/individual/font/font-adobe-100dpi-1.0.4.tar.xz
Source1:        http://xorg.freedesktop.org/archive/individual/font/font-adobe-75dpi-1.0.4.tar.xz
Source2:        http://xorg.freedesktop.org/archive/individual/font/font-arabic-misc-1.0.4.tar.xz
Source3:        http://xorg.freedesktop.org/archive/individual/font/font-bh-100dpi-1.0.4.tar.xz
Source4:        http://xorg.freedesktop.org/archive/individual/font/font-bh-75dpi-1.0.4.tar.xz
Source5:        http://xorg.freedesktop.org/archive/individual/font/font-bh-lucidatypewriter-100dpi-1.0.4.tar.xz
Source6:        http://xorg.freedesktop.org/archive/individual/font/font-bh-lucidatypewriter-75dpi-1.0.4.tar.xz
Source7:        http://xorg.freedesktop.org/archive/individual/font/font-bh-ttf-1.0.4.tar.xz
Source8:        http://xorg.freedesktop.org/archive/individual/font/font-bh-type1-1.0.4.tar.xz
Source9:        http://xorg.freedesktop.org/archive/individual/font/font-bitstream-100dpi-1.0.4.tar.xz
Source10:       http://xorg.freedesktop.org/archive/individual/font/font-bitstream-75dpi-1.0.4.tar.xz
Source12:       http://xorg.freedesktop.org/archive/individual/font/font-bitstream-type1-1.0.4.tar.xz
Source13:       http://xorg.freedesktop.org/archive/individual/font/font-cronyx-cyrillic-1.0.4.tar.xz
Source14:       http://xorg.freedesktop.org/archive/individual/font/font-cursor-misc-1.0.4.tar.xz
Source15:       http://xorg.freedesktop.org/archive/individual/font/font-daewoo-misc-1.0.4.tar.xz
Source16:       http://xorg.freedesktop.org/archive/individual/font/font-dec-misc-1.0.4.tar.xz
Source17:       http://xorg.freedesktop.org/archive/individual/font/font-ibm-type1-1.0.4.tar.xz
Source18:       http://xorg.freedesktop.org/archive/individual/font/font-isas-misc-1.0.4.tar.xz
Source19:       http://xorg.freedesktop.org/archive/individual/font/font-jis-misc-1.0.4.tar.xz
Source20:       http://xorg.freedesktop.org/archive/individual/font/font-micro-misc-1.0.4.tar.xz
Source21:       http://xorg.freedesktop.org/archive/individual/font/font-misc-cyrillic-1.0.4.tar.xz
Source22:       http://xorg.freedesktop.org/archive/individual/font/font-misc-ethiopic-1.0.5.tar.xz
Source23:       http://xorg.freedesktop.org/archive/individual/font/font-misc-meltho-1.0.4.tar.xz
Source24:       http://xorg.freedesktop.org/archive/individual/font/font-misc-misc-1.1.3.tar.xz
Source25:       http://xorg.freedesktop.org/archive/individual/font/font-mutt-misc-1.0.4.tar.xz
Source26:       http://xorg.freedesktop.org/archive/individual/font/font-schumacher-misc-1.1.3.tar.xz
Source27:       http://xorg.freedesktop.org/archive/individual/font/font-screen-cyrillic-1.0.5.tar.xz
Source28:       http://xorg.freedesktop.org/archive/individual/font/font-sony-misc-1.0.4.tar.xz
Source29:       http://xorg.freedesktop.org/archive/individual/font/font-sun-misc-1.0.4.tar.xz
Source30:       http://xorg.freedesktop.org/archive/individual/font/font-winitzki-cyrillic-1.0.4.tar.xz
Source31:       http://xorg.freedesktop.org/archive/individual/font/font-xfree86-type1-1.0.5.tar.xz
Source32:       http://xorg.freedesktop.org/archive/individual/font/encodings-1.0.7.tar.xz
Source33:       http://xorg.freedesktop.org/archive/individual/font/font-adobe-utopia-100dpi-1.0.5.tar.xz
Source34:       http://xorg.freedesktop.org/archive/individual/font/font-adobe-utopia-75dpi-1.0.5.tar.xz
Source35:       http://xorg.freedesktop.org/archive/individual/font/font-adobe-utopia-type1-1.0.5.tar.xz
Source36:       http://xorg.freedesktop.org/archive/individual/font/font-alias-1.0.5.tar.xz
Source100:      README.converted
%if "%{flavor}" == "converted"
Source1000:     https://pwu.fedorapeople.org/fonts/convertbitmap/convertfont.py
BuildRequires:  fontpackages-devel
BuildRequires:  fonttosfnt
BuildRequires:  ftdump
BuildRequires:  ttf-converter >= 1.0.6
BuildRequires:  xorg-x11-fonts-legacy
Requires(post): fonts-config
Requires(posttrans):fonts-config
Requires(postun):fonts-config
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
# In TW and SLE 15 SP2/Leap 15.2 we have pango >= 1.44.0 which
# doesn't support Type1 fonts (boo#1169444)
Supplements:    (xorg-x11-fonts and libpango-1_0-0)
%endif
%else
# "%%{flavor}" != "converted"
BuildRequires:  bdftopcf
BuildRequires:  fontpackages-devel
BuildRequires:  mkfontscale
# ucs2any
BuildRequires:  font-util
PreReq:         fonts-config
Requires:       %{name}-core
Recommends:     %{name}-converted
Recommends:     %{name}-legacy
Provides:       xorg-x11-fonts-cyrillic
Provides:       xorg-x11-fonts-scalable
Provides:       xorg-x11-fonts-syriac
Obsoletes:      xorg-x11-fonts-cyrillic
Obsoletes:      xorg-x11-fonts-scalable
Obsoletes:      xorg-x11-fonts-syriac
%endif

%description
This package contains fonts maintained and shipped with X.Org.

%if "%{flavor}" == "converted"
This package contains the Type1 (.pfb) fonts from xorg-x11-fonts,
converted to TrueType format, so they can be used by
applications that don't support Type1 fonts.
%endif

%package core
Summary:        Core Fonts for X.Org
Group:          System/X11/Fonts
PreReq:         fonts-config
Provides:       xorg-x11:/usr/X11R6/lib/X11/fonts/misc/cursor.pcf.gz

%description core
This package contains the 'fixed' and 'cursor' font required for any X
Server.

%package legacy
Summary:        Core Fonts for X.Org
Group:          System/X11/Fonts
PreReq:         fonts-config
Requires:       xorg-x11-fonts
Provides:       xorg-x11-fonts-100dpi
Provides:       xorg-x11-fonts-75dpi
Obsoletes:      xorg-x11-fonts-100dpi
Obsoletes:      xorg-x11-fonts-75dpi

%description legacy
This package contains the original Type1 and bitmap fonts that are converted
to truetype format in the xorg-x11-fonts-converted package

%prep
%setup -T -D -c
%if "%{flavor}" != "converted"
for i in $RPM_SOURCE_DIR/*.tar.xz; do tar xf $i; done
%else
cp %{SOURCE100} .
tar xf %{SOURCE0}
tar xf %{SOURCE1}
%endif

%build
%if "%{flavor}" != "converted"
echo -e '#!/bin/sh\nexec /usr/bin/gzip -n -9 "$@"' > ../gzip ; chmod a+x ../gzip ; PATH=`pwd`/..:$PATH
for dir in encodings-* $(ls | grep -v -e encodings -e alias) font-alias-* ; do
  pushd $dir
    case $dir in
     *alias-*)     option="--with-fontrootdir=/usr/share/fonts"            ;;
     *encodings-*) option="--with-encodingsdir=/usr/share/fonts/encodings" ;;
     *100dpi-*)    option="--with-fontdir=/usr/share/fonts/100dpi"         ;;
     *75dpi-*)     option="--with-fontdir=/usr/share/fonts/75dpi"          ;;
     *type1-*)     option="--with-fontdir=/usr/share/fonts/Type1"          ;;
     *ethiopic-*)  option="--with-ttf-fontdir= --with-otf-fontdir=/usr/share/fonts/truetype" ;;
     *meltho-*)    option="--with-fontdir=/usr/share/fonts/truetype"       ;;
     *misc-*)      option="--with-fontdir=/usr/share/fonts/misc"           ;;
     *ttf-*)       option="--with-fontdir=/usr/share/fonts/truetype"       ;;
     *cyrillic-*)  option="--with-fontdir=/usr/share/fonts/cyrillic"       ;;
     *)            option=""                                               ;;
    esac
    #autoreconf -fi
    ./configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
                --prefix=/usr --libdir=%{_libdir} \
                --mandir=%{_mandir} ${option}
  popd
done

%else
# "%%{flavor}" == "converted"
cp %{S:1000} .
ttf-converter --input-dir /usr/share/fonts/Type1/ --output-dir generated
ttf-converter --bitmap-fonts /usr/share/fonts/misc/clB8x10.pcf.gz /usr/share/fonts/misc/clB8x12.pcf.gz /usr/share/fonts/misc/clB8x13.pcf.gz /usr/share/fonts/misc/clB8x14.pcf.gz /usr/share/fonts/misc/clB8x16.pcf.gz /usr/share/fonts/misc/clB9x15.pcf.gz /usr/share/fonts/misc/clI6x12.pcf.gz /usr/share/fonts/misc/clR6x12.pcf.gz  --output-dir generated/
ttf-converter --bitmap-fonts /usr/share/fonts/misc/clR8x8.pcf.gz /usr/share/fonts/misc/clB8x8.pcf.gz /usr/share/fonts/misc/clI8x8.pcf.gz --output-dir generated/
ttf-converter --bitmap-fonts /usr/share/fonts/75dpi/*.pcf.gz /usr/share/fonts/100dpi/*.pcf.gz /usr/share/fonts/misc/[dghjo]*.pcf.gz --output-dir generated/

# Special case for B&H LucidaBright Italic and Bold Italic
ttf-converter --bitmap-fonts --subfamily Italic /usr/share/fonts/75dpi/lubI08.pcf.gz /usr/share/fonts/75dpi/lubI10.pcf.gz /usr/share/fonts/75dpi/lubI12.pcf.gz /usr/share/fonts/75dpi/lubI14.pcf.gz /usr/share/fonts/75dpi/lubI18.pcf.gz /usr/share/fonts/75dpi/lubI19.pcf.gz /usr/share/fonts/75dpi/lubI24.pcf.gz /usr/share/fonts/100dpi/lubI08.pcf.gz /usr/share/fonts/100dpi/lubI10.pcf.gz /usr/share/fonts/100dpi/lubI12.pcf.gz /usr/share/fonts/100dpi/lubI14.pcf.gz /usr/share/fonts/100dpi/lubI18.pcf.gz /usr/share/fonts/100dpi/lubI19.pcf.gz /usr/share/fonts/100dpi/lubI24.pcf.gz --output-dir generated/
ttf-converter --bitmap-fonts --subfamily "Bold Italic" /usr/share/fonts/75dpi/lubBI08.pcf.gz /usr/share/fonts/75dpi/lubBI10.pcf.gz /usr/share/fonts/75dpi/lubBI12.pcf.gz /usr/share/fonts/75dpi/lubBI14.pcf.gz /usr/share/fonts/75dpi/lubBI18.pcf.gz /usr/share/fonts/75dpi/lubBI19.pcf.gz /usr/share/fonts/75dpi/lubBI24.pcf.gz /usr/share/fonts/100dpi/lubBI08.pcf.gz /usr/share/fonts/100dpi/lubBI10.pcf.gz /usr/share/fonts/100dpi/lubBI12.pcf.gz /usr/share/fonts/100dpi/lubBI14.pcf.gz /usr/share/fonts/100dpi/lubBI18.pcf.gz /usr/share/fonts/100dpi/lubBI19.pcf.gz /usr/share/fonts/100dpi/lubBI24.pcf.gz --output-dir generated/

ttf-converter --bitmap-fonts --subfamily Regular /usr/share/fonts/misc/cu12.pcf.gz /usr/share/fonts/misc/cu-alt12.pcf.gz --output-dir generated/
ttf-converter --bitmap-fonts --subfamily Italic --bitmapTransform skew,1,3 /usr/share/fonts/misc/cu12.pcf.gz --output-dir generated/
ttf-converter --bitmap-fonts --subfamily Regular --fix-glyph-unicode --replace-unicode-values 0x32AD,0x4EC --replace-unicode-values 0x32AE,0x4ED /usr/share/fonts/misc/cu-pua12.pcf.gz --output-dir generated/

# Move arabic characters to the right unicode block
ttf-converter --bitmap-fonts --subfamily Regular --shift-unicode-values 0,300,1530 /usr/share/fonts/misc/arabic24.pcf.gz --output-dir generated/
ttf-converter --bitmap-fonts --subfamily Regular --shift-unicode-values 0,300,1530 /usr/share/fonts/misc/cuarabic12.pcf.gz --output-dir generated/

# Move latin characters from fullwidth unicode block so they can be used.
#ttf-converter --bitmap-fonts --shift-unicode-values 0xff01,0xff5d,-65248  /usr/share/fonts/misc/hanglg16.pcf.gz --output-dir generated/
#ttf-converter --bitmap-fonts --shift-unicode-values 0xff01,0xff5d,-65248 --replace-unicode-values 0xffe0,0xa2 --replace-unicode-values 0xffe2,0xac --replace-unicode-values 0xffe1,0xa3 --replace-unicode-values 0xffe5,0xa5 /usr/share/fonts/misc/hanglm24.pcf.gz /usr/share/fonts/misc/hanglm16.pcf.gz --output-dir generated/
#ttf-converter --bitmap-fonts --shift-unicode-values 0xff01,0xff5d,-65248 /usr/share/fonts/misc/gb16fs.pcf.gz --output-dir generated/
sed -i -e 's/FAMILY_NAME "\(.*\)"/FAMILY_NAME "\1-converted"/' font-adobe*75dpi*/cour*[012][0248].bdf \
    font-adobe*75dpi*/helv*[012][0248].bdf
sed -i -e 's/FAMILY_NAME "\(.*\)"/FAMILY_NAME "\1-converted"/' font-adobe*100dpi*/cour*[012][0248].bdf \
    font-adobe*100dpi*/helv*[012][0248].bdf

for name in font-adobe*/cour*.bdf font-adobe*/helv*.bdf; do
    fonttosfnt -b -c -g 2 -m 2 -o "${name%.bdf}.otb" "$name"
done

rm font-adobe*100*/cour*10.otb font-adobe*100*/helv*10.otb
for p in font-adobe*/cour*.otb font-adobe*/helv*.otb ; do
    realsize=`ftdump -p "$p" | grep size.*y_ppem | sed -e "s/.*size \([0-9]*\)\..*/\1/"`
    realsize=`printf %02d $realsize`
    dpi=`echo "$p" | sed -e "s/.*-\([0-9]*dpi\).*/\1/"`
    newname=`echo $p | sed -e "s/..\.otb$/-$dpi-$realsize.otb/"`
    if [ "$p" != "$newname" ]; then
        mv "$p" "$newname"
    fi
done
# Remove fonts of size 11 that are actually the same size as fonts of size 10
rm font-adobe*100*/cour*11.otb font-adobe*100*/helv*11.otb
# Remove fonts of size 20 that are actually the same size as fonts of size 18
rm font-adobe*100*/cour*20.otb font-adobe*100*/helv*20.otb
# Remove fonts of size 25 that are actually the same size as fonts of size 24
rm font-adobe*100*/cour*25.otb font-adobe*100*/helv*25.otb

cd generated

# Luxi Mono, Luxi Sans and Luxi Serif are already distributed in ttf format
rm Luxi*.ttf

# Bitstream-Charter-* is already converted to ttf format as CharterBT-*
rm Bitstream-Charter-*.otb

# Cursor.ttf just contains glyphs to be used as cursor, which isn't usable as ttf format
rm Cursor.ttf

# Bitstream-Terminal and DEC-Terminal are not converted correctly so we better remove them
rm Bitstream-Terminal*.otb
rm DEC-Terminal*.otb

# The Sun-OPEN-LOOK fonts just contains bitmap patterns without unicode values. They're hardly useful
rm Sun-OPEN-LOOK-cursor-Wide-Regular.otb
rm Sun-OPEN-LOOK-glyph-Wide-Regular.otb
rm Sun-OPEN-LOOK-glyph-Regular.otb
%endif

%install
%if "%{flavor}" != "converted"
for dir in encodings-* $(ls | grep -v -e encodings -e alias) font-alias-* ; do
    case $dir in
	*misc-cyrillic-*) option='FONT_FILES=koi12x24b koi12x24 koi6x13b koi7x14b koi8x16b koi8x16 koi9x15b koi9x18b';;
	*)                option='NOOPT=' ;;
    esac
    make -C $dir install DESTDIR=$RPM_BUILD_ROOT "${option}"
done
rm -f $RPM_BUILD_ROOT/usr/share/fonts/*/fonts.cache*
find $RPM_BUILD_ROOT/usr/share/fonts/75dpi -type f -iname \*.pcf.gz | sed -e "s+$RPM_BUILD_ROOT++g" -e 's+^usr+/usr+g' | \
  grep -v -e ISO8859 >> files.%{name}-core
rm -rf $RPM_BUILD_ROOT/usr/etc
rm -f $RPM_BUILD_ROOT/fonts.{dir,scale}
rm -f $RPM_BUILD_ROOT/usr/share/fonts/encodings/{,large}/encodings.dir

%else
# "%%{flavor}" == "converted"
cd generated
mkdir -p %{buildroot}/%{_datadir}/fonts/truetype
cp *.ttf %{buildroot}/%{_datadir}/fonts/truetype

for filename in Adobe-New-Century-Schoolbook*.otb \
   Adobe-Symbol-Regular.otb \
   Adobe-Times*.otb \
   Adobe-Utopia*.otb \
   B\&H-LucidaBright*.otb \
   B\&H-Lucida-Sans*.otb \
   B\&H-LucidaTypewriter-Sans*.otb \
   Arabic-Newspaper-Regular.otb \
   MUTT-ClearlyU-Alternate-Glyphs-Wide-Regular.otb \
   MUTT-ClearlyU-Arabic-Extra-Regular.otb \
   MUTT-ClearlyU-PUA-Regular.otb \
   MUTT-ClearlyU-Wide-Regular.otb \
   MUTT-ClearlyU-Wide-Italic.otb \
   Schumacher-Clean-Bold.otb \
   Schumacher-Clean-Wide-Bold.otb \
   Schumacher-Clean-Italic.otb \
   Schumacher-Clean-Wide-Italic.otb \
   Schumacher-Clean-Regular.otb \
   Schumacher-Clean-Wide-Regular.otb \
   ISAS-Fangsong-ti-Wide-Regular.otb \
   ISAS-Song-ti-Wide-Regular.otb \
   Daewoo-Gothic-Wide-Regular.otb \
   Daewoo-Mincho-Wide-Regular.otb \
   JIS-Fixed-Wide-Regular.otb \
   ; do
    cp "$filename"  %{buildroot}/%{_datadir}/fonts/truetype
done
cd ..
cp font-adobe*/*.otb %{buildroot}/%{_datadir}/fonts/truetype/

%endif

%clean
rm -rf "$RPM_BUILD_ROOT"

# %%post scriptlets
%reconfigure_fonts_scriptlets

%if "%{flavor}" != "converted"
%reconfigure_fonts_scriptlets -n xorg-x11-fonts-core
%reconfigure_fonts_scriptlets -n xorg-x11-fonts-legacy

%files
%defattr(-,root,root)
%dir /usr/share/fonts/Type1
%dir /usr/share/fonts/cyrillic
%dir /usr/share/fonts/truetype
%ghost /usr/share/fonts/Type1/encodings.dir
%ghost /usr/share/fonts/Type1/fonts.dir
%ghost /usr/share/fonts/Type1/fonts.scale
%ghost %verify(not mode) /usr/share/fonts/Type1/.fonts-config-timestamp
%ghost /usr/share/fonts/cyrillic/encodings.dir
%ghost /usr/share/fonts/cyrillic/fonts.dir
%ghost /usr/share/fonts/cyrillic/fonts.scale
%ghost %verify(not mode) /usr/share/fonts/cyrillic/.fonts-config-timestamp
/usr/share/fonts/cyrillic/fonts.alias
/usr/share/fonts/cyrillic/*.pcf.gz
%ghost /usr/share/fonts/truetype/encodings.dir
%ghost /usr/share/fonts/truetype/fonts.dir
%ghost /usr/share/fonts/truetype/fonts.scale
%ghost %verify(not mode) /usr/share/fonts/truetype/.fonts-config-timestamp
/usr/share/fonts/truetype/*.otf
/usr/share/fonts/truetype/*.ttf
/%{_sysconfdir}

%files core
%defattr(-,root,root)
%dir /usr/share/fonts/misc
%dir /usr/share/fonts/encodings
%dir /usr/share/fonts/encodings/large
/usr/share/fonts/encodings/*.enc.gz
/usr/share/fonts/encodings/large/*.enc.gz
%ghost /usr/share/fonts/misc/encodings.dir
%ghost /usr/share/fonts/misc/fonts.dir
%ghost /usr/share/fonts/misc/fonts.scale
%ghost %verify(not mode) /usr/share/fonts/misc/.fonts-config-timestamp
/usr/share/fonts/misc/fonts.alias
/usr/share/fonts/misc/[1-9k]*.pcf.gz
/usr/share/fonts/misc/cursor.pcf.gz
/usr/share/fonts/misc/micro.pcf.gz
/usr/share/fonts/misc/nil2.pcf.gz

%files legacy -f files.%{name}-core
%dir /usr/share/fonts/75dpi
%ghost /usr/share/fonts/75dpi/encodings.dir
%ghost /usr/share/fonts/75dpi/fonts.dir
%ghost /usr/share/fonts/75dpi/fonts.scale
%ghost %verify(not mode) /usr/share/fonts/75dpi/.fonts-config-timestamp
%dir /usr/share/fonts/100dpi
%ghost /usr/share/fonts/100dpi/encodings.dir
%ghost /usr/share/fonts/100dpi/fonts.dir
%ghost /usr/share/fonts/100dpi/fonts.scale
%ghost %verify(not mode) /usr/share/fonts/100dpi/.fonts-config-timestamp
/usr/share/fonts/75dpi/fonts.alias
/usr/share/fonts/75dpi/*-ISO8859-*.pcf.gz
/usr/share/fonts/100dpi/fonts.alias
/usr/share/fonts/100dpi/*.pcf.gz
/usr/share/fonts/misc/arabic24.pcf.gz
/usr/share/fonts/misc/cu[^r]*.pcf.gz
/usr/share/fonts/misc/cl*.pcf.gz
/usr/share/fonts/misc/[dghjo]*.pcf.gz
/usr/share/fonts/Type1/*.afm
/usr/share/fonts/Type1/*.pfa
/usr/share/fonts/Type1/*.pfb

%else

# "%%{flavor}" == "converted"
%files
%defattr(-,root,root)
%doc README.converted
%dir %{_datadir}/fonts/truetype
%{_datadir}/fonts/truetype/CharterBT-*.ttf
%{_datadir}/fonts/truetype/Courier10PitchBT-*.ttf
%{_datadir}/fonts/truetype/Courier-*.ttf
%{_datadir}/fonts/truetype/Courier.ttf
%{_datadir}/fonts/truetype/Utopia-*.ttf
%{_datadir}/fonts/truetype/B&H-LucidaTypewriter*.otb
%{_datadir}/fonts/truetype/Adobe-New-Century-Schoolbook*.otb
%{_datadir}/fonts/truetype/Adobe-Symbol-Regular.otb
%{_datadir}/fonts/truetype/Adobe-Times*.otb
%{_datadir}/fonts/truetype/Adobe-Utopia*.otb
%{_datadir}/fonts/truetype/B&H-LucidaBright*.otb
%{_datadir}/fonts/truetype/B&H-Lucida-Sans*.otb
%{_datadir}/fonts/truetype/B&H-LucidaTypewriter-Sans*.otb
%{_datadir}/fonts/truetype/Arabic-Newspaper-Regular.otb
%{_datadir}/fonts/truetype/MUTT-ClearlyU-Alternate-Glyphs-Wide-Regular.otb
%{_datadir}/fonts/truetype/MUTT-ClearlyU-Arabic-Extra-Regular.otb
%{_datadir}/fonts/truetype/MUTT-ClearlyU-PUA-Regular.otb
%{_datadir}/fonts/truetype/MUTT-ClearlyU-Wide-Regular.otb
%{_datadir}/fonts/truetype/MUTT-ClearlyU-Wide-Italic.otb
%{_datadir}/fonts/truetype/Schumacher-Clean-Regular.otb
%{_datadir}/fonts/truetype/Schumacher-Clean-Bold.otb
%{_datadir}/fonts/truetype/Schumacher-Clean-Italic.otb
%{_datadir}/fonts/truetype/Schumacher-Clean-Wide-Regular.otb
%{_datadir}/fonts/truetype/Schumacher-Clean-Wide-Bold.otb
%{_datadir}/fonts/truetype/Schumacher-Clean-Wide-Italic.otb
%{_datadir}/fonts/truetype/ISAS-Fangsong-ti-Wide-Regular.otb
%{_datadir}/fonts/truetype/ISAS-Song-ti-Wide-Regular.otb
%{_datadir}/fonts/truetype/Daewoo-Gothic-Wide-Regular.otb
%{_datadir}/fonts/truetype/Daewoo-Mincho-Wide-Regular.otb
%{_datadir}/fonts/truetype/JIS-Fixed-Wide-Regular.otb
%{_datadir}/fonts/truetype/cour*.otb
%{_datadir}/fonts/truetype/helv*.otb
%endif

%changelog
* Tue Feb 28 2023 Stefan Dirsch <sndirsch@suse.com>
- encodings-1.0.7
  font-adobe-75dpi-1.0.4
  font-adobe-utopia-100dpi-1.0.5
  font-adobe-utopia-75dpi-1.0.5
  font-adobe-utopia-type1-1.0.5
  font-alias-1.0.5
  font-arabic-misc-1.0.4
  font-bh-100dpi-1.0.4
  font-bh-75dpi-1.0.4
  font-bh-lucidatypewriter-100dpi-1.0.4
  font-bh-lucidatypewriter-75dpi-1.0.4
  font-bh-ttf-1.0.4
  font-bh-type1-1.0.4
  font-bitstream-100dpi-1.0.4
  font-bitstream-75dpi-1.0.4
  font-bitstream-type1-1.0.4
  font-cronyx-cyrillic-1.0.4
  font-cursor-misc-1.0.4
  font-daewoo-misc-1.0.4
  font-dec-misc-1.0.4
  font-ibm-type1-1.0.4
  font-isas-misc-1.0.4
  font-jis-misc-1.0.4
  font-micro-misc-1.0.4
  font-misc-cyrillic-1.0.4
  font-misc-ethiopic-1.0.5
  font-misc-meltho-1.0.4
  font-misc-misc-1.1.3
  font-mutt-misc-1.0.4
  font-schumacher-misc-1.1.3
  font-screen-cyrillic-1.0.5
  font-sony-misc-1.0.4
  font-sun-misc-1.0.4
  font-winitzki-cyrillic-1.0.4
  font-xfree86-type1-1.0.5
  * These releases bundle up the last twelve years worth of build
    system improvements, including making the configure script
    more efficient and using the -n flag to gzip to improve build
    reproducibility.
* Mon Feb 27 2023 Stefan Dirsch <sndirsch@suse.com>
- font-adobe-100dpi 1.0.4
  * This release bundles up the last twelve years worth of build
    system improvements, including making the configure script
    more efficient and using the -n flag to gzip to improve build
    reproducibility.
* Wed Dec  7 2022 Dominique Leuenberger <dimstar@opensuse.org>
- Do not ever use "%%setup -n .": rpm 4.18 tries to be cleaner and
  remove stuff it extraced, which would lead to 'rm -rf .', which
  rm does not like. Use "%%setup -c" instead, which creates the
  appropriate %%{name}-%%{version} directory expected.
* Tue Jul 12 2022 Stefan Dirsch <sndirsch@suse.com>
- encodings 1.0.6
  gitlab CI: add a basic build test
  Build xz tarballs instead of bzip2
  adjust descriptions for the Unicode mapping to match the Unicode.org data file.
  add mapping for 0x80-0x9f, as per Unicode.org data files.
  use descriptions from UnicodeData.txt except for two obsolete or incorrect maps
  correct a typo (in original), and use appropriate description
  use Armenian eternity symbol from Unicode 6.
  whitespace-only changes for consistency, using luit's annotate-enc script
  add descriptions from UnicodeData.txt, using annotate-enc
  add descriptions from UnicodeData.txt, using annotate-enc
  add descriptions from UnicodeData.txt, using annotate-enc
  add descriptions from UnicodeData.txt, with annotate-enc
  add descriptions from UnicodeData.txt, with annotate-enc
  whitespace-only, reformat with annotate-enc
* Tue Aug  3 2021 Antonio Larrosa <alarrosa@suse.com>
- Convert the helv*.otb and cour*.otb files in a different way,
  generating all available font sizes as fonts files named
  * -75-dpi-converted and *-100dpi-converted and having the same
  font name for 75 and 100 dpi converted fonts (fixes boo#1174895).
- As part of the above fix, don't remove the "Regular" suffix from
  the full name of fonts in convertfont.py
* Sun Aug 23 2020 Stefan Dirsch <sndirsch@suse.com>
- font-alias 1.0.4 and font-misc-ethiopic 1.0.4
  * These minor maintenance releases roll up the past decade's
    worth of fixes & cleanups.
* Mon Jun 29 2020 Antonio Larrosa <alarrosa@suse.com>
- Use ttf-converter 1.0.6 to build an  Italic version of
  cu12.pcf.gz in the converted subpackage
- Include the subfamily in the filename of converted fonts
- Use ttf-converter's new bitmap font support to convert
  Schumacher Clean and Schumacher Clean Wide since it generates
  a font file that we can actually use (boo#1169444 #c41)
- Stop using convertfont.py and just use ttf-converter for all fonts
- Replace a couple of unicode values in cu-pua12.pcf.gz to fix them
  (others probably also need fixing).
- Shift some unicode values in arabic24.pcf.gz and cuarabic12.pcf.gz
  to correct them so glyphs don't pretend to be latin characters
  when they're not.
- Stop distributing Bitstream-Charter-*.otb, Cursor.ttf,
  Sun-OPEN-LOOK-*.otb, MUTT-ClearlyU-Devangari-Extra-Regular,
  MUTT-ClearlyU-Ligature-Wide-Regular and
  MUTT-ClearlyU-Devanagari-Regular as converted fonts since they
  have most probably wrong unicode values in their glyphs.
* Tue Jun  9 2020 Antonio Larrosa <alarrosa@suse.com>
- Add Recommends: xorg-x11-fonts-converted and xorg-x11-fonts-legacy
  so the packages get installed automatically (and users can remove
  any of them or both)
* Mon Jun  8 2020 Antonio Larrosa <alarrosa@suse.com>
- Add a legacy subpackage that provides the bitmap and Type1 fonts
  under /usr/share/fonts/(75dpi|100dpi|Type1) so the user can
  choose if installing the original fonts (the legacy subpackage),
  the fonts converted to TrueType format (the converted subpackage)
  or both.
- Add some pcf fonts too from /usr/share/fonts/misc to the legacy
  subpackage and make them available as TrueType in the converted
  package (boo#1169444)
* Mon May  4 2020 Antonio Larrosa <alarrosa@suse.com>
- Differentiate also Requires, BuildRequires, Obsoletes and more
  statements between the two flavors.
* Thu Apr 30 2020 Antonio Larrosa <alarrosa@suse.com>
- Use multibuild to add a converted flavor subpackage that has
  Type1 and bitmap fonts converted to truetype/opentype format
  (boo#1169444)
* Tue Jun 18 2019 Stefan Dirsch <sndirsch@suse.com>
- encodings 1.0.5
  * jisx0201.1976-0.enc: Add undefined mapping for 0x7f - 0xa0 range
  * cns11643-x encodings don't need to alias to themselves
* Fri Mar 22 2019 Stefan Dirsch <sndirsch@suse.com>
- no longer buildrequire mkfontdir package since mkfontdir program
  is now included by mkfontscale package
* Thu Sep 27 2018 sndirsch@suse.com
- make font Provides noarch; it was wrong from the beginning
  (boo#1110020
* Mon Mar 12 2018 stefan.bruens@rwth-aachen.de
- Cleanup packaging, see boo#1085143 for details:
  * Remove special handling for openSUSE 12.2 and earlier.
  * Mark fonts.{dir,scale} and encodings.dir as %%ghost files instead
    of %%config. These files are created by the %%posttrans scriptlets
    so no need to ship these, also avoids creation of .rpmsave files.
    Also track these files consistently for all subdirs.
  * add .fonts-config-timestamp as %%ghost, ignore if it is missing.
  * remove encodings.dir from encodings directories.
* Fri Mar  9 2018 stefan.bruens@rwth-aachen.de
- Drop font-bitstream-speedo-1.0.2.tar.bz2, Speedo font format is
  deprecated since X11R7.0 (released 2005-12-21). Courier 10 Pitch
  and Charter are still available as Type 1, see boo#1084661.
* Sat Jun  3 2017 bwiedemann@suse.com
- use wrapper script during build to call gzip -n
  to not add timestamps to .gz files to have fully reproducible builds
* Wed Jun 11 2014 sndirsch@suse.com
- mark .dir/.scale files as '%%verify(not md5 size mtime)';
  triggered by Machinery's output
* Fri Apr  5 2013 idonmez@suse.com
- Add Source URL, see https://en.opensuse.org/SourceUrls
* Wed Aug  8 2012 sndirsch@suse.com
- fixed build for openSUSE <= 12.1
* Mon Aug  6 2012 pgajdos@suse.com
- prepare spec file for dropping SuSEconfig.fonts (openFATE#313536)
* Tue Jun 26 2012 sndirsch@suse.com
- use proper Buildrequires
  * xorg-x11 --> mkfontscale,mkfontdir,bdftopcf
  * xorg-x11-fonts-devel --> font-util
* Wed Sep 21 2011 coolo@suse.com
- simplify buildrequires
* Tue May 24 2011 eich@suse.de
- Removed encodings.diff.
  This patch was there to make the japanese encoding
  jisx0201.1976-0 ASCII-like. The correnct encoding had
  two ASCII code points replaced by the Yen sign and
  the overstrike character. This patch seems to have
  served as a workaround for an already quite ugly
  workaround.
  We drop it now.
* Thu May 19 2011 eich@novell.com
- Remove patch font-misc-cyrillic.diff
  Instead specify the fonts to be built and installed explicitely
  on the command line with "FONT_FILES=<list>".
* Thu May 19 2011 eich@suse.de
- Remove patch font-misc-ethiopic.diff
  To install only OTF fonts set --with-ttf-fontdir= to an
  empty string.
* Tue Dec 21 2010 sndirsch@novell.com
- bumped version number to 7.6
* Tue Nov 16 2010 sndirsch@novell.com
- font-arabic-misc-1.0.3,
  font-bh-100dpi-1.0.3,
  font-bh-75dpi-1.0.3,
  font-bh-lucidatypewriter-100dpi-1.0.3,
  font-bh-lucidatypewriter-75dpi-1.0.3,
  font-bh-type1-1.0.3,
  font-bitstream-100dpi-1.0.3,
  font-bitstream-75dpi-1.0.3,
  font-bitstream-speedo-1.0.2,
  font-bitstream-type1-1.0.3,
  font-cronyx-cyrillic-1.0.3,
  font-cursor-misc-1.0.3,
  font-daewoo-misc-1.0.3,
  font-dec-misc-1.0.3,
  font-ibm-type1-1.0.3,
  font-isas-misc-1.0.3,
  font-jis-misc-1.0.3,
  font-micro-misc-1.0.3,
  font-misc-cyrillic-1.0.3,
  font-misc-ethiopic-1.0.3,
  font-misc-meltho-1.0.3,
  font-misc-misc-1.1.2,
  font-mutt-misc-1.0.3,
  font-schumacher-misc-1.1.2,
  font-screen-cyrillic-1.0.4,
  font-sony-misc-1.0.3,
  font-sun-misc-1.0.3,
  font-winitzki-cyrillic-1.0.3,
  font-xfree86-type1-1.0.4
  * CVS tags purges by Jesse Adkins
  * font-util macro bump to 1.2 by Gaétan Nadon
* Mon Nov 15 2010 sndirsch@novell.com
- font-adobe-100dpi-1.0.3,
  font-adobe-75dpi-1.0.3,
  font-adobe-utopia-100dpi-1.0.4,
  font-adobe-utopia-75dpi-1.0.4,
  font-adobe-utopia-type1-1.0.4
  * CVS tags purges by Jesse Adkins
  * font-util macro bump to 1.2 by Gaétan Nadon
* Thu Nov 11 2010 sndirsch@novell.com
- font-bh-ttf 1.0.3
  * This bug-fix release fixes the installation path of the
    fontconfig 42-luxi-mono.conf files introduced in 1.0.2, plus
    adds support for finding the correct fontconfig path from the
    fontconfig.pc file variables added recently in fontconfig git.
* Sat Oct 30 2010 sndirsch@novell.com
- encodings 1.0.4
  * This minor maintenance release is built with the latest X.Org
    autotools macros and provides the usual recent collection of
    build configuration improvements and janitorial cleanups.
* Tue Oct  5 2010 sndirsch@novell.com
- all font modules (besides font-bitstream-speedo) updated to use
  the new font-utils 1.1.2
- font-bh-ttf 1.0.2:
  * Install a fontconfig snippet to force treating Luxi Mono fonts
    as monospaced
- font-mutt-misc 1.0.2:
  * ClearlyU: fix off-by-one error in U+FFE1 through U+FFE6 range
    (full-width currency characters)
- font-sun-misc 1.0.2:
  * Update Sun license notices to current X.Org standard form
    and Oracle as copyright holder
* Sun Sep  5 2010 sndirsch@novell.com
- font-bitstream-speedo 1.0.1
* Wed Apr  7 2010 sndirsch@suse.de
- unfuzzed font-misc-cyrillic.diff
* Sun Apr  4 2010 sndirsch@suse.de
- encodings 1.0.3
- font-adobe-100dpi 1.0.1
- font-adobe-75dpi 1.0.1
- font-adobe-utopia-100dpi 1.0.2
- font-adobe-utopia-75dpi 1.0.2
- font-adobe-utopia-type1 1.0.2
- font-alias 1.0.2
- font-arabic-misc 1.0.1
- font-bh-100dpi 1.0.1
- font-bh-75dpi 1.0.1
- font-bh-lucidatypewriter-100dpi 1.0.1
- font-bh-lucidatypewriter-75dpi 1.0.1
- font-bh-ttf 1.0.1
- font-bh-type1 1.0.1
- font-bitstream-100dpi 1.0.1
- font-bitstream-75dpi 1.0.1
- font-bitstream-type1 1.0.1
- font-cronyx-cyrillic 1.0.1
- font-cursor-misc 1.0.1
- font-daewoo-misc 1.0.1
- font-dec-misc 1.0.1
- font-ibm-type1 1.0.1
- font-isas-misc 1.0.1
- font-jis-misc 1.0.1
- font-micro-misc 1.0.1
- font-misc-cyrillic 1.0.1
- font-misc-ethiopic 1.0.1
- font-misc-meltho 1.0.1
- font-misc-misc 1.1.0
- font-mutt-misc 1.0.1
- font-schumacher-misc 1.1.0
- font-screen-cyrillic 1.0.2
- font-sony-misc 1.0.1
- font-sun-misc 1.0.1
- font-winitzki-cyrillic 1.0.1
- font-xfree86-type1 1.0.2
- adjusted font-misc-ethiopic.diff
- bumped version number to 7.5
* Thu Dec 24 2009 aj@suse.de
- font-misc-cyrillic.diff
  * removed also 6x13 duplicates (bnc #524236)
* Wed Sep 30 2009 sndirsch@suse.de
- font-misc-cyrillic.diff
  * removed also 5x8/6x9 duplicates (bnc #524236)
* Mon Jul 27 2009 sndirsch@suse.de
- removed duplicate fonts (bnc #524236)
* Thu Sep 11 2008 sndirsch@suse.de
- bumped release number to 7.4
* Wed Jul  2 2008 sndirsch@suse.de
- reverted previous change; back to Latin1 fonts for aliases
  (bnc #405723)
* Sat Apr 26 2008 sndirsch@suse.de
- fontaliases-unicode.diff
  * use Unicode instead of Latin1 fonts for aliases (bnc #46285)
* Fri Mar  7 2008 sndirsch@suse.de
- font-xfree86-type1 1.0.1
* Thu Dec 13 2007 sndirsch@suse.de
- mark fonts.dir/fonts.scale/encodings.dir as %%config in filelist
* Sat Sep 29 2007 sndirsch@suse.de
- bumped version to 7.3
* Tue Jul 24 2007 sndirsch@suse.de
- move most important fonts to xorg-x11-fonts-core (Bug #293793)
* Mon Feb 12 2007 sndirsch@suse.de
- font-misc-ethiopic.diff:
  * don't install TTF fonts any longer; OTF fonts should be enough
* Wed Nov  8 2006 sndirsch@suse.de
- udpated font-screen-cyrillic to release 1.0.1 (X.Org 7.2 RC2)
  * Add license from Andrey via Mikhail on xorg list.
* Wed Nov  8 2006 sndirsch@suse.de
- updated encodings to release 1.0.2 (X.Org 7.2 RC2)
  * Limit UNDEFINE line to en encoding's declared SIZE (bug 1248).
    Simplify some encodings to avoid stating the obvious.
    Remove the ansi-1251 encoding, it's called microsoft-cp1251.
* Sat Oct 21 2006 sndirsch@suse.de
- updated encodings to release 1.0.1
  * Added configure flags for --disable-gzip-small-encodings and
  - -disable-gzip-large-encodings for those who can afford a
    little extra disk space usage and prefer the performance of
    non-compressed reads.
  * Also added COPYING file with generic XFree86 copyright/license
    and converted ChangeLog to generate from git log.
* Mon Oct 16 2006 aj@suse.de
- Fix build, fonts.cache might not exist.
* Thu Aug 31 2006 sndirsch@suse.de
- added fonts-config to Prereq of main and -core subpackage
* Wed Aug 30 2006 sndirsch@suse.de
- moved encodings to -core subpackage
* Tue Aug 29 2006 sndirsch@suse.de
- move 'fixed' + 'cursor' fonts to new xorg-x11-fonts-core package
* Wed Aug  9 2006 sndirsch@suse.de
- fixed /usr/share/fonts directory conflict with filesystem
* Fri Jul 28 2006 sndirsch@suse.de
- use "-fno-strict-aliasing"
* Thu Jul 27 2006 sndirsch@suse.de
- adjusted JIS0201 to CP932 encoding (Bug #194720)
* Thu Jul 27 2006 sndirsch@suse.de
- use $RPM_OPT_FLAGS
* Wed Jun 28 2006 sndirsch@suse.de
- created package