Re: Rotated text
- From: "Tom de Neef" <tdeneef@xxxxxxxx>
- Date: Sat, 18 Nov 2006 21:44:51 +0100
<alanglloyd@xxxxxxx> schreef in bericht
On Nov 18, 4:30 pm, "Tom de Neef" <tden...@xxxxxxxx> wrote:
<snip>Currently I use the procedure below to output text at an angle on a
canvas.
Several source on the internet approach it in this way. But I must say:
the
quality of the result is pretty poor. Are there better ways to do this ?
Thank you,
Tom
In what way is the "quality poor" ?
I use a similar code with good quality faces but the origin of narrow
characters seems misplaced. I start with an existing font in AFont, and
a canvas ACanvas.
var
LogFont : TLogFont;
FontAngleD := FontAngleR * DegPerRad; // in deg
{make a font of this angle}
with LogFont do begin
FillChar(LogFont, sizeof(TLogFont), 0); {clear memory}
lfHeight := AFont.Height;
lfEscapement := trunc(FontAngleD * 10);
lfOrientation := lfEscapement; // should be same
lfWeight := FW_BOLD;
lfOutPrecision := OUT_TT_PRECIS;
lfFaceName := 'Arial';
ACanvas.Font.Handle := CreateFontIndirect(LogFont);
end; {with LogFont}
Alan Lloyd
Yes, your code gives the same results. The quality depends on the typeface,
the weight and the size. Arial is better than Times Roman, bold is better
than normal, large letters come out better than small ones. When you have a
smallish font (say 10 pt) and place texts above each other with a rotation
interval of 5 degrees you see immediately that letter spacing and alignment
are poor.
But if this is the best there is, it will have to do.
Tom
.
- References:
- Rotated text
- From: Tom de Neef
- Re: Rotated text
- From: alanglloyd@xxxxxxx
- Rotated text
- Prev by Date: Re: Rotated text
- Next by Date: Re: ISO
- Previous by thread: Re: Rotated text
- Next by thread: Re: Rotated text
- Index(es):
Relevant Pages
|