Problems building the unifont PFA and DIT files for the PDF book

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've tried groff-ifying the Unifont, in the same way I do it with the
Tinos font.  However, I've had a few problems.

Here's the Tinos font that's packaged with Debian:

	$ apt-file find tinos | grep ttf
	texlive-fonts-extra-links: /usr/share/texlive/texmf-dist/fonts/truetype/google/tinos/Tinos-Bold.ttf
	texlive-fonts-extra-links: /usr/share/texlive/texmf-dist/fonts/truetype/google/tinos/Tinos-BoldItalic.ttf
	texlive-fonts-extra-links: /usr/share/texlive/texmf-dist/fonts/truetype/google/tinos/Tinos-Italic.ttf
	texlive-fonts-extra-links: /usr/share/texlive/texmf-dist/fonts/truetype/google/tinos/Tinos-Regular.ttf

And here's the Unifont:

	$ apt-file find unifont | grep otf | grep fonts | grep -v japanese
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont.otf
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont_csur.otf
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont_jp.otf
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont_jp_sample.otf
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont_sample.otf
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont_upper.otf
	fonts-unifont: /usr/share/fonts/opentype/unifont/unifont_upper_sample.otf

First problem:

In the Unifont, I don't see a "Regular" font.  I assumed I should take
the unifont.otf file.

Here's how I've been groff-ifying the Tinos font:

	$ make build-fonts-tinos -B --debug=pretty
	MKDIR		.tmp/fonts/devpdf/
	install -m 755 -d .tmp/fonts/devpdf/
	PFBTOPS		.tmp/fonts/devpdf/Tinos.pfa
	pfbtops </usr/share/texlive/texmf-dist/fonts/type1/google/tinos/Tinos.pfb >.tmp/fonts/devpdf/Tinos.pfa
	FONTFORGE	.tmp/fonts/devpdf/TinosR.afm
	fontforge   -lang=ff -c 'Open("/usr/share/texlive/texmf-dist/fonts/truetype/google/tinos/Tinos-Regular.ttf");Generate(".tmp/fonts/devpdf/TinosR.afm");'
	Copyright (c) 2000-2024. See AUTHORS for Contributors.
	 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
	 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
	 Version: 20230101
	 Based on sources from 2024-03-07 23:15 UTC-ML-D-GDK3.
	PythonUI_Init()
	copyUIMethodsToBaseTable()
	Program root: /usr
	The following table(s) in the font have been ignored by FontForge
	  Ignoring 'DSIG' digital signature table
	The glyph named null is mapped to U+0000.
	  But its name indicates it should be mapped to U+2400.
	The glyph named periodcentered is mapped to U+2219.
	  But its name indicates it should be mapped to U+00B7.
	The glyph named Delta is mapped to U+0394.
	  But its name indicates it should be mapped to U+2206.
	The glyph named Omega is mapped to U+03A9.
	  But its name indicates it should be mapped to U+2126.
	The glyph named mu is mapped to U+03BC.
	  But its name indicates it should be mapped to U+00B5.
	AFMTODIT	.tmp/fonts/devpdf/TinosR
	afmtodit -e /usr/share/groff/current/font/devpdf/enc/text.enc .tmp/fonts/devpdf/TinosR.afm /usr/share/groff/current/font/devpdf/map/text.map .tmp/fonts/devpdf/TinosR
	/usr/local/bin/afmtodit: AGL name 'mu' already mapped to groff name 'mc'; ignoring AGL name 'uni00B5'
	/usr/local/bin/afmtodit: AGL name 'periodcentered' already mapped to groff name 'pc'; ignoring AGL name 'uni00B7'
	/usr/local/bin/afmtodit: both gravecomb and uni0340 map to u0300 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both acutecomb and uni0341 map to u0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both uni0313 and uni0343 map to u0313 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both uni02B9 and uni0374 map to u02B9 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both alphatonos and uni1F71 map to u03B1_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both epsilontonos and uni1F73 map to u03B5_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both etatonos and uni1F75 map to u03B7_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both iotatonos and uni1F77 map to u03B9_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both omicrontonos and uni1F79 map to u03BF_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both omegatonos and uni1F7D map to u03C9_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Alphatonos and uni1FBB map to u0391_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Epsilontonos and uni1FC9 map to u0395_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Etatonos and uni1FCB map to u0397_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both iotadieresistonos and uni1FD3 map to u03B9_0308_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Iotatonos and uni1FDB map to u0399_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Upsilontonos and uni1FEB map to u03A5_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both dieresistonos and uni1FEE map to u00A8_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Omicrontonos and uni1FF9 map to u039F_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Omegatonos and uni1FFB map to u03A9_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both uni2000 and uni2002 map to u2002 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both uni2001 and uni2003 map to u2003 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both Ohm and uni2126 map to u03A9 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both uni1FE3 and upsilondieresistonos map to u03C5_0308_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both uni1F7B and upsilontonos map to u03C5_0301 at /usr/local/bin/afmtodit line 6586.
	/usr/local/bin/afmtodit: both patah and yodyod_patah map to u05B7 at /usr/local/bin/afmtodit line 6586.

Are any of those warnings something I should take care of?  Or should I
just ignore them?  If they're unimportant, can I ask that low severity
warnings not be printed?  Or should I just 2>/dev/null?

Well, apart from those warnings, that works.  Now, I repeat the process
with the Unifont:

	$ make build-fonts-unifont -B --debug=pretty
	MKDIR		.tmp/fonts/devpdf/
	install -m 755 -d .tmp/fonts/devpdf/
	FONTFORGE	.tmp/fonts/devpdf/Unifont.pfa
	fontforge   -lang=ff \
		-c 'Open("/usr/share/fonts/opentype/unifont/unifont.otf");Generate(".tmp/fonts/devpdf/Unifont.pfa");'
	Copyright (c) 2000-2024. See AUTHORS for Contributors.
	 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
	 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
	 Version: 20230101
	 Based on sources from 2024-03-07 23:15 UTC-ML-D-GDK3.
	PythonUI_Init()
	copyUIMethodsToBaseTable()
	Program root: /usr
	AFMTODIT	.tmp/fonts/devpdf/UnifontR
	afmtodit -e /usr/share/groff/current/font/devpdf/enc/text.enc .tmp/fonts/devpdf/Unifont.afm /usr/share/groff/current/font/devpdf/map/text.map .tmp/fonts/devpdf/UnifontR

Much nicer on stderr, which gave me hope at first.

But then I try to build the PDF book with both fonts.

	$ grep -rh -e Tinos -e Unifont share/mk/build/pdf/book/
		print ".pdfpagenumbering D . 1\n.nr PDFOUTLINE.FOLDLEVEL 0\n.defcolor pdf:href.colour rgb 0.00 0.25 0.75\n.pdfinfo /Title \"The Linux man-pages Book\"\n.special TinosR UnifontR S\n";

And I get a warning about the Unifont:

	$ make build-pdf-book
	GROPDF		.tmp/man-pages-6.7-70-gd80376b08.pdf
	troff:.tmp/fonts/devpdf/UnifontR: error: font description 'spacewidth' directive missing
	troff:fanotify_init.2:322: warning [page 192, 4.2i]: cannot adjust line
	troff:membarrier.2:272: warning [page 475, 3.0i]: cannot adjust line
	statx.2:240: warning: table wider than line length minus indentation
	troff:syscall.2:171: warning: cannot select font 'CW'
	troff:syscall.2:301: warning: cannot select font 'CW'
	troff:syscalls.2:205: warning [page 1074, 5.7i (diversion '3tbd17,0', 0.0i)]: cannot adjust line
	troff:syscalls.2:760: warning [page 1074, 5.7i (diversion '3tbd174,0', 0.0i)]: cannot break line
	troff:syscalls.2:1278: warning [page 1074, 5.7i (diversion '3tbd317,0', 0.0i)]: cannot break line
	^Cmake: *** [/home/alx/src/linux/man-pages/man-pages/contrib/share/mk/build/pdf/book/_.mk:39: .tmp/man-pages-6.7-70-gd80376b08.pdf] Interrupt

Did I do anything wrong with the Unifont?  I suspect of treating it as a
Regular font without any indication that I should.

(The Tinos changes are already in master.  The Unifont changes are in
 the contrib branch, since I'm not yet happy with them.)

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux