freetype-devel
[Top][All Lists]
Advanced

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

RE: [Devel] fontstyle misconception


From: Kaushik Datta
Subject: RE: [Devel] fontstyle misconception
Date: Fri, 12 Jul 2002 10:47:52 -0700

Hi Vincent,
Thanks for your quick response.
Actually I am stuck with the Mangal.ttf file which is for the Hindi (
Indian ) language.Though I have this Mangal.ttf file,but I do not have
anything like Mangalbd.ttf( for BOLD) or Mangali.ttf( for Italic).
How can I display BOLD or ITALIC text using the same Mangal.ttf file.
Do you mean to say that this Mangal.ttf file would be having different Face
index for different fontstyles and so we have to pass different face index
parameter to display BOLD or ITALIC?
Thanks and regards,
=kaushik

-----Original Message-----
From: address@hidden [mailto:address@hidden
Behalf Of Vincent Caron
Sent: Thursday, July 11, 2002 8:08 AM
To: address@hidden
Subject: Re: [Devel] fontstyle misconception


On Fri, 2002-07-12 at 05:06, Kaushik Datta wrote:
> Hi,
> I have downloaded and analysed the freetype library.But I think I had a
> misconception about the ttf fontstyles.
> I thought that for different fontstyles we would require different ttf
> files..........like Arialbd for Arial BOLD,Ariali for Arial Italics etc.
> But Now I think that actually we can change the fontstyle to BOld or
Italics
> from a single file say Arial.ttf

A collection of glyphs from the same family using the same style is
called a 'face'. A font file might embed several faces, although much of
the time we have exactly one face per file. This is why you have the
'face_index' parameter in the FT_New_Face() function. In your example,
the MS Arial styles are splitted in one face per file, each face
implementing a style variant of the Arial family.

> Also does this freetype library support Underline fontstyle and
> Strikethrough fontstyle?

FreeType does not render those features, this is rather a  layout/text
rendering problem. Some scalable fonts will provide metrics for
underlining, look at the global metrics 'underline_position' and
'underline_thickness' in the FT_Face object. As for overstrike, I guess
you should consider the half-height of an 'x'.



_______________________________________________
Devel mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/devel




reply via email to

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