Floater and My Rating

  1. anonymous

    I recently disabled all of my symbol/dingbat/webding fonts and when I went to listen to iTunes and the song changed, I noticed that the rating stars in the floater turned into odd characters (little boxes). I finally figured out that the problem was related to the font being disabled.

    I have two questions: (a) what is the font that is intended to be used to make the stars (there are many fonts with stars) and (b) why not use images instead of stars? I'd think that this would be better as you wouldn't have to worry about font issues and I don't think it would add too much to the overall size of the application bundle.

  2. Greg Hurrell

    The advantage of fonts over (bitmap) images is that they are scalable, so as the text in the floater grows, the stars grow with them.

    Synergy isn't actually requesting any special fonts here. It's just using the normal "system font" (usually Lucida Grande, although Synergy does not ask for it by name) and the appropriate Unicode character for that particular star shape. If you have a standard Mac OS X install with standard Mac OS X system fonts, then the stars will display correctly.

    If you're curious to know about the Unicode character set and the different glyphs available in it, you can check out the character palette from within most Cocoa apps which edit text (such as TextEdit). Hit Command-T and then choose "Characters..." from the action menu.

  3. daemon

    Thanks for the reply

    I didn't know that the stars "grew" with the floater and that explains the reason for not using bitmaps.

    Interesting that Synergy doesn't request any special fonts because if I disable "Apple Symbol" it makes the stars turn into miscellaneous glyphs.

    I'll see if I can find time to write a dummy cocoa application to play around with this and see if I can't find out why this happens and possibly some debug info to see what the system is doing to cause this to happen.

  4. Greg Hurrell

    Quote: Thanks for the reply

    I didn't know that the stars "grew" with the floater and that explains the reason for not using bitmaps.

    Interesting that Synergy doesn't request any special fonts because if I disable "Apple Symbol" it makes the stars turn into miscellaneous glyphs.

    I'll see if I can find time to write a dummy cocoa application to play around with this and see if I can't find out why this happens and possibly some debug info to see what the system is doing to cause this to happen.

    Whatever it's doing, I think it's doing it pretty cleverly... As I said, Synergy just asks for the system font without naming it. The OS is obviously using whatever font is most appropriate for that Unicode value. You can make a really easy test application using lines like this. Code:NSLog(@"unicode: %C", 0x2605); (0x2605 is the Unicode value for a black star)

Reply

This topic is now closed.