From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail
From: "James P. Ascher" via "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#41958: ps-print-buffer only knows about some fonts for MacOS
 Preview
Date: Fri, 19 Jun 2020 21:30:06 +0000
Message-ID: <m0mu53vx41.fsf@slab.space>
References: <m0mu53vx41.fsf@slab.space>
Reply-To: "James P. Ascher" <jpsa@protonmail.com>, "James P. Ascher" <jpsa@protonmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202";
	logging-data="126281"; mail-complaints-to="usenet@ciao.gmane.io"
To: 41958@debbugs.gnu.org, viniciusjl@ig.com.br
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 20 00:00:17 2020
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1jmP3Z-000Wkx-0T
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Jun 2020 00:00:17 +0200
Original-Received: from localhost ([::1]:54758 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1jmP3Y-00054e-1W
	for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Jun 2020 18:00:16 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41502)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1jmP3L-00051b-E9
 for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 18:00:03 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:45437)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1jmP3L-0003DE-3T
 for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 18:00:03 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1jmP3L-00006L-2E
 for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 18:00:03 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: "James P. Ascher" <jpsa@protonmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Fri, 19 Jun 2020 22:00:02 +0000
Resent-Message-ID: <handler.41958.B.159260395632748@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 41958
X-GNU-PR-Package: emacs
X-Debbugs-Original-To: bug-gnu-emacs@gnu.org,
 Vinicius Jose Latorre <viniciusjl@ig.com.br>
Original-Received: via spool by submit@debbugs.gnu.org id=B.159260395632748
 (code B ref -1); Fri, 19 Jun 2020 22:00:02 +0000
Original-Received: (at submit) by debbugs.gnu.org; 19 Jun 2020 21:59:16 +0000
Original-Received: from localhost ([127.0.0.1]:56981 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1jmP2Z-0008W1-2y
 for submit@debbugs.gnu.org; Fri, 19 Jun 2020 17:59:15 -0400
Original-Received: from lists.gnu.org ([209.51.188.17]:42776)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jpsa@protonmail.com>) id 1jmOak-00068B-BZ
 for submit@debbugs.gnu.org; Fri, 19 Jun 2020 17:30:31 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35818)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jpsa@protonmail.com>)
 id 1jmOaj-0006av-Sh
 for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 17:30:29 -0400
Original-Received: from mail1.protonmail.ch ([185.70.40.18]:19060)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jpsa@protonmail.com>)
 id 1jmOag-0006vM-7r
 for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 17:30:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1592602219;
 bh=KmeCDzJGOxlUQwkGpcvc0YCa3Zl/wb7JXK6FMYOCz5A=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=D/P+EJvdFV0IhOuWuNujOAVrvVFY7NucUi1uR7XQt8MvRBOijXXffyQklYP21c64C
 LfZH2yN14Eyaq0bzoepC+AJcPRTugjeVxpc0q29zYu/ftlpbCpjV7Vg2V0NI2ExePh
 g/YY9gVfy5sbL9RQiD5+h9F1l5fyCCgCzu7HSoSU=
In-Reply-To: <m0mu53vx41.fsf@slab.space>
Received-SPF: pass client-ip=185.70.40.18; envelope-from=jpsa@protonmail.com; 
 helo=mail1.protonmail.ch
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/19 17:30:20
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Mailman-Approved-At: Fri, 19 Jun 2020 17:59:12 -0400
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:182188
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/182188>


I use ps-print to produce a PostScript file that I open in MacOS Preview to
double-check before printing.  I'd like to be able to use Hack as a font
rather than Courier.  Right now, Hack isn't recognized along with other
installed fonts, but I can't tell why some work and some don't.


Following the directions in ps-print.el, I tried to add Hack as
a Courier replacement.  I removed the comment and updated this line:

3 cm 20 cm moveto  10/Hack-Regular ReportFontInfo  showpage

Opening the resulting PostScript file in Preview.app gives this error:


PostScript Conversion Warning

Converting the PostScript file "temp.ps" produced the following
warnings: "Hack-Regular" not found, using Courier.


Similarly for "Hack" or "Hack-Italic."  In trying to debug the problem,
I checked fonts on my laptop at random to see if any worked.
AmericanTypewriter-Light works fine while AmericanTypewriter gives the
same error, even though both are in the same directory and seem to be
otherwise similar.  I'll paste the details of those two fonts below, but
I think there must be something in the PostScript generated by ps-print
that doesn't load all the fonts.  Pages, for example, generates
a PostScript file with Hack, but it looks remarkably different than what
ps-print generates--so I'm not entirely sure what to compare.

I'm not sure what to do next to debug this: my PostScript knowledge is
minimal.  Does anyone have a sense of how to figure this out?


Emacs 26.3
MacOS 10.15.5
ps-print.el 7.3.5

Font details from Font Book:

WORKING as "AmericanTypewriter-Light":

PostScript name=09AmericanTypewriter-Light
=09Full name=09American Typewriter Light
=09Family=09American Typewriter
=09Style=09Light
=09Kind=09TrueType
=09Language=09Afrikaans, Albanian, Asturian, Asu, Azerbaijani, Basque, Bela=
rusian, Bemba, Bena, Bosnian, Breton, Bulgarian, Catalan, Chiga, Colognian,=
 Cornish, Croatian, Czech, Danish, Dutch, Embu, English, Esperanto, Estonia=
n, Faroese, Filipino, Finnish, French, Friulian, Galician, Ganda, German, G=
reek, Gusii, Hawaiian, Hungarian, Icelandic, Igbo, Inari Sami, Indonesian, =
Irish, Italian, Jola-Fonyi, Kabuverdianu, Kalaallisut, Kalenjin, Kamba, Kaz=
akh, Kikuyu, Kinyarwanda, Lakota, Latvian, Lithuanian, Lower Sorbian, Luo, =
Luxembourgish, Luyia, Macedonian, Machame, Makhuwa-Meetto, Makonde, Malagas=
y, Malay, Maltese, Manx, Meru, Meta=3DCA=3DBC, Mongolian, Morisyen, North N=
debele, Northern Sami, Norwegian Bokm=3DC3=3DA5l, Norwegian Nynorsk, Nyanko=
le, Oromo, Ossetic, Polish, Portuguese, Quechua, Romanian, Romansh, Rombo, =
Rundi, Russian, Rwa, Samburu, Sango, Sangu, Scottish Gaelic, Sena, Serbian,=
 Shambala, Shona, Slovak, Slovenian, Soga, Somali, Spanish, Swahili, Swedis=
h, Swiss German, Taita, Tajik, Teso, Tongan, Turkish, Turkmen, Ukrainian, U=
pper Sorbian, Uzbek, Vietnamese, Vunjo, Walser, Welsh, Western Frisian, Yor=
uba, Zulu
=09Script=09Cyrillic, Greek, Latin, Tagalog
=09Version=0913.0d1e4
=09Location=09/System/Library/Fonts/Supplemental/AmericanTypewriter.ttc
=09Unique name=09American Typewriter Light; 13.0d1e4; 2017-06-07
=09Copyright=09Digitized data (c) Copyright 1997 E+F Designstudios. ITC Ame=
rican Typewriter is a registered trademark of International Typeface Corpor=
ation.
=09Trademark=09ITC American Typewriter is a registered trademark of Interna=
tional Typeface Corporation.
=09Enabled=09Yes
=09Duplicate=09No
=09Copy protected=09No
=09Glyph count=091,195

GIVES ERROR as "AmericanTypewriter":

PostScript name=09AmericanTypewriter
=09Full name=09American Typewriter
=09Family=09American Typewriter
=09Style=09Regular
=09Kind=09TrueType
=09Language=09Afrikaans, Albanian, Asturian, Asu, Azerbaijani, Basque, Bela=
rusian, Bemba, Bena, Bosnian, Breton, Bulgarian, Catalan, Chiga, Colognian,=
 Cornish, Croatian, Czech, Danish, Dutch, Embu, English, Esperanto, Estonia=
n, Faroese, Filipino, Finnish, French, Friulian, Galician, Ganda, German, G=
reek, Gusii, Hawaiian, Hungarian, Icelandic, Igbo, Inari Sami, Indonesian, =
Irish, Italian, Jola-Fonyi, Kabuverdianu, Kalaallisut, Kalenjin, Kamba, Kaz=
akh, Kikuyu, Kinyarwanda, Lakota, Latvian, Lithuanian, Lower Sorbian, Luo, =
Luxembourgish, Luyia, Macedonian, Machame, Makhuwa-Meetto, Makonde, Malagas=
y, Malay, Maltese, Manx, Meru, Meta=3DCA=3DBC, Mongolian, Morisyen, North N=
debele, Northern Sami, Norwegian Bokm=3DC3=3DA5l, Norwegian Nynorsk, Nyanko=
le, Oromo, Ossetic, Polish, Portuguese, Quechua, Romanian, Romansh, Rombo, =
Rundi, Russian, Rwa, Samburu, Sango, Sangu, Scottish Gaelic, Sena, Serbian,=
 Shambala, Snhona, Slovak, Slovenian, Soga, Somali, Spanish, Swahili, Swedi=
sh, Swiss German, Taita, Tajik, Teso, Tongan, Turkish, Turkmen, Ukrainian, =
Upper Sorbian, Uzbek, Vietnamese, Vunjo, Walser, Welsh, Western Frisian, Yo=
ruba, Zulu
=09Script=09Cyrillic, Greek, Latin, Tagalog
=09Version=0913.0d1e4
=09Location=09/System/Library/Fonts/Supplemental/AmericanTypewriter.ttc
=09Unique name=09American Typewriter; 13.0d1e4; 2017-06-07
=09Copyright=09Digitized data (c) Copyright 1997 E+F Designstudios. ITC Ame=
rican Typewriter is a registered trademark of International Typeface Corpor=
ation.
=09Trademark=09ITC American Typewriter is a registered trademark of Interna=
tional Typeface Corporation.
=09Enabled=09Yes
=09Duplicate=09No
=09Copy protected=09No
=09Glyph count=091,195


Respectfully submitted,
-James

--
James P. Ascher
Doctoral Student, English Department
University of Virginia