fill fonts

Post general font related questions (e.g. how to install, convert and use fonts) and requests (looking for fonts, designers etc.) here.
Post Reply
pride13
Posts: 2
Joined: Tue Jan 25, 2011 11:58 am

fill fonts

Post by pride13 »

Hi everyone, i'm trying to write flash player in java. I have problem with filling glyphs. Can you tell me how fonts are filling ? I'm using flood fill algorithm but there is problem with find seed (pixel inside glyph which start filling). Do you know any methods to find a seed ? Sorry for my english, but i hope You know what i mean.
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9873
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: fill fonts

Post by Bhikkhu Pesala »

Just an educated guess — you may have to wait for a developer to tell you for sure — but I suspect that the flood fill begins filling from the first node on the first contour, contour 0. You can show/hide the first/last nodes from the toolbar, and hide the fill to make them stand out more. Typing shortcut "w" in points mode will select the first node.
Attachments
First Node.png
First Node.png (22.65 KiB) Viewed 3981 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
pride13
Posts: 2
Joined: Tue Jan 25, 2011 11:58 am

Re: fill fonts

Post by pride13 »

I wrote algorithm to find seed. Now i have problem with filling small glyphs - with big one is ok. There are places where my fill method doesn't work. I'm using flood fill based on Smith algorithm and start filling few times in one glyph. Do you know what is the best algorithm to filling glyphs ? Please help, because i have to do this to get a job.
Post Reply