Post general font related questions (e.g. how to install, convert and use fonts) and requests (looking for fonts, designers etc.) here.
3 posts • Page 1 of 1
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: 8477
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
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.
- First Node.png (22.65 KiB) Viewed 2411 times
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.