Re: Rotated text



<alanglloyd@xxxxxxx> schreef in bericht
On Nov 18, 4:30 pm, "Tom de Neef" <tden...@xxxxxxxx> wrote:

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

<snip>


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


.



Relevant Pages

  • Re: Rotated text
    ... quality of the result is pretty poor. ... NewFontHandle:= CreateFontIndirect; ... LogFont: TLogFont; ...
    (comp.lang.pascal.delphi.misc)
  • Re: Never seen anything like this from Federer
    ... When you consider the quality of his opponent too, ... He's very much a poor ... A kind of huge Federer anti-bias in a package of Sampras over-praise. ...
    (rec.sport.tennis)
  • Re: OT: Merc ML series quality
    ... external evidence of the supposedly poor build quality. ... Had I seen such things on just one car, ... Fact is, the ML is not really a Merc, it's built for them in the States ... Anyway the poor build quality caused a big ruckus between ...
    (uk.rec.cars.maintenance)
  • Re: i get it now
    ... >the experience i lack is knowledge of quality equipment, ... LIke you I'm also a poor man, ... record your guitar with your ... then either consult the notes or call the engineer ...
    (rec.audio.pro)
  • Re: Never seen anything like this from Federer
    ... When you consider the quality of his opponent too, ... He's very much a poor ... A kind of huge Federer anti-bias in a package of Sampras over-praise. ... peak levels in sensible manners but Whispers ultra-stupid troll is so ...
    (rec.sport.tennis)