Re: Getting a dotted font from a regular font
Re: Getting a dotted font from a regular font
- Subject: Re: Getting a dotted font from a regular font
- From: Andres Kievsky <email@hidden>
- Date: Sat, 13 Oct 2012 20:02:08 +1300
- Acceptlanguage: en-US, en-NZ
- Thread-topic: Getting a dotted font from a regular font
On 13/10/2012, at 11:22 AM, Graham Cox <email@hidden<mailto:email@hidden>> wrote:
On 01/10/2012, at 11:02 AM, Andres Kievsky <email@hidden<mailto:email@hidden>> wrote:
Then I would render each font in a small, low resolution bitmap (say, 10x10) and then use that bitmap to find the centres around which to draw circles.
So if you have a bit set at (5,5) in the low res bitmap, and you want to render it in a 100x100 size, just draw a circle around (50,50). Repeat for any other bits that are set.
You can achieve this effect using a dashed line. Setting the end caps to round and the spacing to zero for the dash produces a series of round circles along the path. It's much faster and easier than your method, though coming up with the exact spacing and line width needed to fit a given path exactly takes a bit of working out.
--Graham
That's not quite the same effect though (since the dots will follow the path rather than be at equal distances of each other), and the low-res bitmap method is significantly faster.
-- ank
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden