freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] In freetype how can one set font size in pt, but keep resolutio


From: Andrew John Clayphan
Subject: Re: [ft] In freetype how can one set font size in pt, but keep resolution independent?
Date: Wed, 17 May 2006 21:25:14 +1000 (EST)


Firstly, cheers for the reply Werner

I previously made a (small) mistake in my previous mail, in that I have a variable fontsize that is actually a float and not a long (but that still doesn't change the validity of your answer though I believe).

What I was trying exactly to do (without knowing if it was actually possible) is given, say some fontsize in pts (points)(represented by a float), using UNSCALED (so freetype gives me design font units) and somehow scaling them (to correspond to my fontsize, but not be based on any particular resolution) After reading more into the documentation (and your reply seems to confirm what i've been reading) if I want fontsize independent of resolution, I basically have to pick one of the "design font sizes that come in a certain font file" and there is no explict ability to "scale" things upwards. (I guess picking certain bitmap strikes is all that can be possible if using UNSCALED and thus getting back design font units, or would that be a no, and I've screwed my logic somewhere?)

On an aside;
I guess if I could determine the design font size (in pts) being used, I could naively scale the design font size, dividing it out (by whatever its default is) and multiplying by my float (but obviously that would be a bad way to go about it).

Thanks for all your help again,

Cheers,
Andrew

On Wed, 17 May 2006, Werner LEMBERG wrote:


Got a question regarding how does one set font in pt's in freetype,
but keep resolution independent.

This doesn't work.

I read through a bunch of the freetype API documentation, the
tutorials, the glyph conventions, but still am unsure how to set a
fontsize (that is a long) and make the output still be using
UNSCALED everywhere (that is, I don't want anything dependent on
resolution, since im not actually doing any rendering just grabbing
the horiAdvance metric and kerning data)

Whatever you do, this is resolution dependent.  Just think of the
TrueType rasterizer which can modify the metrics depending on the
size.

Please explain what exactly you want to do, maybe we are
miscommunicating.


   Werner


_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype







reply via email to

[Prev in Thread] Current Thread [Next in Thread]