freetype
[Top][All Lists]
Advanced

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

Using contours for vectorized drawing


From: Ang Bodhi
Subject: Using contours for vectorized drawing
Date: Wed, 15 Mar 2000 21:10:12 +0800

Hi,

I am working on a free 3D scene graph API and are currently
writing support for 3D text messages. I want to use the
FreeType library to incorporate TrueType font support.

Basically, I'm trying to use the outline vector data of a TT
font by converting them into 2D world coordinates and faces
suitable for GL rendering. I guess a combination of 2D
points and Move_To/Line_To commands for 2D vectorized
drawing would suffice. I wonder is there any function that
can do this? I'm interested in using FreeType2 API.

I studied FT_Raster_Render() and found that
FT_Decompose_Outline() is used to obtain the outline data in
the form of a series of Move_To, Line_To, Conic_To, Cubic_To
operations. In the last three ops, a line segment or a
Bezier curve is intersected with each y scanline to obtain
the x value. In this way, a glyph's intersection coordinates
with a uniformly spaced grid is obtained for rasterization
(correct me if I'm wrong :-). This is the closest I can find
on converting the TT contours to a form I can use, but this
seems to generate coordinates suitable for rasterization
(with uniformly spaced pixels) rather than for 2D vectorized
drawing (need constraint on the angle between two adjacent
line segments). Can somebody advise me on what to do?

Thanks in advance.

Ang Bodhi







reply via email to

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