🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1010

Re: Font tweaking

#1010
From: Greg Lee
Date: Tue, 05 Sep 1989 14:15
102 lines
4250 bytes
From article <14510@haddock.ima.isc.com>, by karl@haddock.ima.isc.com (Karl Heuer):
" I need to be able to print text containing certain accented letters which are
" not present in the builtin fonts.

" (b) I can easily add my accented characters by extending BuildChar, *if* I can
" first create a user-defined font which is functionally identical to the
" original builtin font.  One way to do this is to let my new font defer to the
" existing font to do the dirty work; i.e. I can have my BuildChar do a setfont
" and a show.  Wilfried Soeker used this approach in his article last February.

Soeker has the remark in his code that the underlying characters,
the basic character and the diacritic, will be cached, so maybe
that will make it fast enough.

I have a first draft done of a system, based on Soeker's approach,
which constructs Microsoft Word initialization files with diacriticked
fonts prepared from a specification file.  The spec file lists
the two characters to be combined with the font position they
are to occupy, and optionally a model to follow for positioning
the diacritic.  In the latter case, the model character+diacritic
combination is looked up in the afm file to determine where to
move the diacritic;  otherwise an approximation is made based
on bounding box info for the two characters in the afm file.

Two problems with this approach:  if one includes all the fonts
normally handled by MS Word, the postscrp.ini file becomes
very bulky (with all those tables).  And I don't think there's
a real good way to calculate diacritic position for slanted
fonts.  Also, my version doesn't yet give access to characters
not in the Adobe standard encoding.

Does anyone know whether it's ok to distribute the MS Word
initialization files?  There's no copyright notice on them.


				Greg, lee@uhccux.uhcc.hawaii.edu

Here's what the spec file looks like:
		-----------
	Diacritic'd characters for Marshallese

Introduction
------------

This file will be used to prepare tables for use in a modified MS Word
initialization file for PostScript.  The principle table determines what
characters will be printed as a combination of a letter and a
diacritic.  Lines in this file of the form

	<letter-name> <diacritic-name> at <number>

cause entries to be made in this "Accenttable".  In this form of
statement,

	<letter-name> is the PostScript name of a letter, such
		as M or ampersand,
	<diacritic-name> is the PostScript name of a diacritic
		letter, such as acute or cedilla, and
	<number> is an integer from 0 to 255 in decimal notation.

The <number> gives the font position or character number that
will be used in Word, and the two names give the two letter
forms that will be combined to create the composite letter
to be printed for this font position.  The names must name
PostScript letters that are encoded in the PS standard
encoding.  The <diacritic-name> must be one of the following:

	quoteright	slash		bar
	quotesingle	quotedblleft	grave
	acute		circumflex	tilde
	macron		breve		dotaccent
	dieresis	ring		cedilla
	hungarumlaut	ogonek		caron
	emdash		hyphen

The two names may optionally be separated by spaces or tabs.
Spaces or tabs at the beginning of an entry are also
optional.

Lines in this file of the form
	<letter-name> at <number>
are also recognized and are used to change the font position
of a letter from its default location in Word.


		(used to be C cedilla at 128)
   O cedilla at 128
	align like C cedilla
		(used to be u dieresis at 129)
   u macron at 129
	align like u dieresis
		(used to be acute at 130)
   m cedilla at 130
	align like C cedilla
		(used to be a circumflex at 131)
   a dieresis at 131
		(used to be a dieresis at 132)
   a macron at 132
	align like a tilde
   a grave at 133
		(used to be a ring at 134)
[rest omitted]
Technical Details
Message-ID: <4750@uhccux.uhcc.hawaii.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!uhccux!lee
References: <14510@haddock.ima.isc.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!uhccux!lee
From: lee@uhccux.uhcc.hawaii.edu (Greg Lee)
Newsgroups: comp.lang.postscript
Subject: Re: Font tweaking
Message-ID: <4750@uhccux.uhcc.hawaii.edu>
Date: 5 Sep 89 14:15:20 GMT
References: <14510@haddock.ima.isc.com>
Organization: University of Hawaii
Lines: 102