Hi all,
I have successfully obtained the Truetype fonts glyph and rendered onto
screen as an outline bitmap... however I want to have these outlines of
fonts filled...
I have tried flood fill, but it needs correctly setting up a seed, which
is
a pixel safely inside the font outline... but sometimes there are contours
inside contours, and lacking of seed information making my flood-fill very
ugly...
I have also tried scanline fill, but at some low resolution there will be
some degenerated outlines, for example, a single pixel-width vertical
line(which should be regarded as already filled by 1-width wide band), a
multiple-pixel horizontal flat band, etc. My scanline filling program does
not correctly recogonize these degerated cases and sometimes underfills
some
regions and sometimes overfills some regions...
I want to ask what is the correct way to fill the Truetype glyph? Does the
truetype font file has information of where are the seeds neccessary for
floodfill?
Also, if I go deep into how the glyph outlines are drawn, I can see in
fact
they are straightlines, if I record down all these straightlines' starting
and ending points(I am not sure they are in good order for polygon fill,
etc. It seems to me that they are not in counterclockwise, or anyother
orders...) how do I fill the outlines using information of these starting
and ending points?
thanks a lot


|