Re: [NTG-pdftex] Extensions to \font syntax ?
Hi Phil & Reinhard, Reinhard sumarized it well enough: it's not trivial to do. Also, adding new features to pdftex is not desired now. If you want to alter the font matrix, maybe it's worthwhile to take a look at the examples in samplepdf.tex. It requires some macro programming, but I am sure it's trivial for you. Regards, Thanh On Sun, Dec 07, 2008 at 06:57:16AM +0100, Reinhard Kotucha wrote:
Philip TAYLOR (Ret'd) writes:
Dear Thanh / PdfTeX team --
Has any consideration ever been given to the idea of extending the syntax of TeX's \font command within the context (small "c") of PdfTeX ?
What I have in mind are the following :
\font \cmex = cmex10 rotated <angle> \font \cmex = cmex10 translated <matrix>
Hi Phil, I like such a feature too. But there are some technical problems. Type 1 fonts have a font matrix which can be altered when a font is loaded. It's quite easy to change the matrix in order to slant, rotate, ... a font. But pdftex also supports TrueType fonts which are lacking a font matrix.
It doesn't mean that pdftex isn't able to do what you propose, but it's nontrivial. It has to alter the so-called PDF text matrix. But this sounds easier than it is.
I made a similar suggestion a few years ago. I modified the text matrix of a PDF file in order to slant an upright font and posted the resulting PDF file to the mailing list. I asked whether pdftex can't do something similar. I got a response from Mark Wicks, the author of dvipdfm. He said: "Your example is too simple." He had been right, things turned out to be much more difficult than I expected.
And changing the matrix isn't sufficient. You'll certainly have to adapt the .tfm files. All this doesn't look like a weekend project.
Regards, Reinhard
-- ---------------------------------------------------------------------------- Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:reinhard.kotucha@web.de ---------------------------------------------------------------------------- Microsoft isn't the answer. Microsoft is the question, and the answer is NO. ----------------------------------------------------------------------------
Dear Reinhard / Thanh -- Many thanks for your comments. I'm sorry that "adding new features to pdftex is not desired now", but I guess if it's good enough for Don, then it's good enough for Thanh :-) As to Reinhard's closing observation :
And changing the matrix isn't sufficient. You'll certainly have to adapt the .tfm files.
I can't see why this is the case : once PdfTeX has read the TFM file, is it not sufficient "simply" to manipulate its internal version thereof, rather than the TFM file itself ? After all, once it has produced the Pdf file there is no longer any need for access to the TFM, so what does one gain by modifying it ? ** Phil -------- P.S. I've kludged my way around it for now, but it's not pretty; see "Hu'o'ng" in the last line of the attached.
Hi Phil! Philip TAYLOR (Ret'd) wrote:
Dear Reinhard / Thanh -- Many thanks for your comments. I'm sorry that "adding new features to pdftex is not desired now", but I guess if it's good enough for Don, then it's good enough for Thanh :-)
As for the original problem, I expect Thanh would use a Vietnamese font to typeset Vietnamese names.
Reinhard's closing observation :
And changing the matrix isn't sufficient. You'll certainly have to adapt the .tfm files.
I can't see why this is the case : once PdfTeX has read the TFM file, is it not sufficient "simply" to manipulate its internal version thereof,
The "" marks are the key. ;-) Side note: in luatex you can already do things like this by creating a virtual font or even a single virtual character on the fly, using a lua table to define the virtual commands. Best wishes, Taco
Taco Hoekwater wrote:
As for the original problem, I expect Thanh would use a Vietnamese font to typeset Vietnamese names.
Yes, I accept that that is the proper way; but as this letter was not only in Vietnamese but also in Polish (possibly in some other languages as well, quite apart from English) I thought it simpler to stick to basic CM and to kludge my way around the diacritics ...
The "" marks are the key. ;-)
OK, fair enough :-)
Side note: in luatex you can already do things like this by creating a virtual font or even a single virtual character on the fly, using a lua table to define the virtual commands.
Ah, promising : is LT scheduled for inclusion in TL2009 ? ** Phil.
Philip TAYLOR (Ret'd) wrote:
Side note: in luatex you can already do things like this by creating a virtual font or even a single virtual character on the fly, using a lua table to define the virtual commands.
Ah, promising : is LT scheduled for inclusion in TL2009 ?
Yes, it is (there is one in texlive 2008 already, but it is not advisable to use that version for any real work, yet) Best wishes, Taco
Odd, there was no attachment :-( It's also at http://wuntun.royal-tunbridge-wells.org/christmas-letters/2008/sample.pdf if you want to take a look ...
P.S. I've kludged my way around it for now, but it's not pretty; see "Hu'o'ng" in the last line of the attached.
participants (3)
-
Philip TAYLOR (Ret'd)
-
Taco Hoekwater
-
Thanh Han The