[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rendering of fixed-width fonts
From: |
Adrian Robert |
Subject: |
Re: Rendering of fixed-width fonts |
Date: |
Tue, 15 Mar 2005 23:57:45 -0500 |
On 2005-03-15 12:38:44 -0500 Adam Fedor <address@hidden> wrote:
On Mar 15, 2005, at 7:33 AM, Adrian Robert wrote:
This leads to the next question -- is it possible to detect at
runtime
whether you are running under Art or Xlib? (So as to change
rendering
strategies.)
In a way, yes. You can check for the backend contexts, like this:
if (GSClassFromName("ARTContext") != nil)
Thanks.
Is there any more efficient way to render with regular spacing than
repeated calls to moveto and show?
Try DPSxyshow and variants.
Ah. Attached is a patch implementing these functions in back-art. ;-)
It modifies the existing DPSshow implementation to handle DPSxyshow,
DPSxshow, and DPSyshow. Partial support is there for DPSwidthshow.
Right now I just patched ftfont-old.m since that's what I'm using
(freetype-2.1.2), and anyway this patch needs some feedback.
For one thing, I don't check the 'size' argument when deltas are
provided. I don't know where people are finding DPS documentation
that goes into this sort of detail, but the postscript docs I read
said an error is generated if 'size' isn't the same as the text
length. Should I check and throw an exception?
For another, I'm not sure when the y advancement should be used. I
guess even the Japanese are mostly writing horizontally now, at
least on computers? ;-)
<ARTContext.patch>
<ftfont-old.patch>
ARTContext.patch
Description: Text Data
ftfont-old.patch
Description: Text Data
- Rendering of fixed-width fonts, Adrian Robert, 2005/03/15
- Re: Rendering of fixed-width fonts, Adam Fedor, 2005/03/15
- Re: Rendering of fixed-width fonts,
Adrian Robert <=
- Re: Rendering of fixed-width fonts, Banlu Kemiyatorn, 2005/03/16
- Re: Rendering of fixed-width fonts, Adrian Robert, 2005/03/16
- Re: Rendering of fixed-width fonts, Sheldon Gill, 2005/03/17
- Re: Rendering of fixed-width fonts, Alex Perez, 2005/03/17
- Re: Rendering of fixed-width fonts, Fred Kiefer, 2005/03/16
- Re: Rendering of fixed-width fonts, Adrian Robert, 2005/03/17
- Re: Rendering of fixed-width fonts, Adam Fedor, 2005/03/17