fill fonts
fill fonts
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.
-
- Top Typographer
- Posts: 9873
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: fill fonts
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 (22.65 KiB) Viewed 3981 times
Re: fill fonts
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.