Archive Notes Projects Meta

Correct Me If I’m Mshtakan

Tuesday, September 25 2007 at 11:21 pm

I recently found myself the victim of a certain font-related bug in Mac OS X. To put it succinctly, it seems that when there are multiple fonts available to use for glyph substitution, whatever unknown criteria are used to determine their priority can sometimes result in extremely poor glyph choice.

In my case, it was Black Star (U+2605 in Unicode). My system was choosing the font Mshtakan, which has the worst Black Star of any font installed. Instead of looking like a star, it looks more like an asterisk:

What Black Star is supposed to look like Black Star Hiragino Kaku Gothic Pro W3
What Mshtakan’s looks like Black Star Mshtakan
What it looks like on your computer

There’s a good article on Daring Fireball about this very problem. The generally available workarounds are:

  1. Specify a specific font that has a better Black Star, such as Hiragino Kaku.
  2. Wait until Leopard and hope Apple fixes the bug.
  3. Disable Mshtakan.

#1 is the choice employed by Gruber on Daring Fireball. Unfortunately, I can’t force the entire internet follow suit, and it’s not plausible in some contexts (such as RSS). I am too impatient for #2.

That leaves choice #3, which is fast and easy, and most folks who encounter this bug and actually bother to invest time into a workaround will probably choose. However, I am not most folks.

You see, Mshtakan is the only font on my system that covers the Armenian character set! Not that I speak or care about Armenian in the first place—the odds of me ever really needing to view a page in Armenian are basically zero. I'm just a completist with too much free time on his hands.

Anyhow, for whatever foolhardy reason, I invented choice #4: fix Mshtakan. So I downloaded Font Forge, a freeware X11 font editor, and used it to excise Mshtakan’s Black Star glyph entirely. I installed my custom Mshtakan in my home Library folder, and then used Font Book to disable the original one. And voilà! My Black Stars began rendering in Hiragino Kaku again!

I've decided to make my custom Mshtakan available for download, in case any other completists out there are having this problem and don’t have as much free time as me. I've appended “No black star version” to the copyright string, since that seemed like the safest way to differentiate it. The version and internal font name are unchanged, so you’ll need to open Font Book and disable the old Mshtakan. Alternatively, you could backup and replace the original in /Library/Fonts to make this change system-wide.

Download modified Mshtakan

Update: I've removed the download at the request of Michael Everson (creator of Mshtakan), who pointed out that I can’t legally redistribute it.

Commentary

  1. Wednesday, September 26 2007 at 2:18 pm

    From what I can see here, case #2 seems to be the way to go.I have the default Mshtakan installed. I have done no special hacking, and the star looks like it should on my computer. The star in Mshtakan is still quite small, but it renders great i Safari.

  2. Saturday, October 6 2007 at 11:58 pm

    Thank you for sharing!

  3. Wednesday, September 26 2007 at 2:28 pm

    You can tell Safari to use a custom stylesheet, and in this stylesheet you can add the CSS rule. I have an example on my website, which I tested with your demo. It appears to fix the problem.

    It’s not as complete of a solution as yours, but it seems a bit simpler. Even better, it can allow you to change everyone else’s fonts. I prefer Myriad Pro, and so I added it to the my “preferred font” list in the CSS file. The CSS file should use !important to help it override any settings which may be set (unless, of course, you don’t wish it to do so). To include the CSS file, go to Safari > Preferences > Advanced and add a style sheet.

    If you want to see my CSS file, my post is at http://ialexi.com/blog/2007/09/26/black-star-safari-font-error

    Alex

  4. Monday, October 1 2007 at 5:24 am

    […] Correct Me If I’m Mshtakan […]

  5. Wednesday, September 26 2007 at 2:29 pm

    Miau! is right. Its fixed in Leopard.

  6. Wednesday, September 26 2007 at 8:49 pm

    Gosh, I hope Miau and Mycintosh are right! I like using the stars all the time because they make nice bullets, but I have to avoid the black one because of the Mshtaken problem.

  7. Thursday, September 27 2007 at 2:03 am

    Mshtakan means “Eternal” in Armenian. The headline, therefore is “Correct me if I'm Eternal”

    Very zen-like.

  8. Thursday, September 27 2007 at 7:52 am

    I'm the designer of Mshtakan. I've been made aware of this bug and will correct it.

    In fact the size of the star came from an old Soviet type book, but I understand that it is reasonable for modern requirements to take precedence. A star is a star after all. I’ll be changing the size of this star and adding a WHITE STAR of the same size.

    Regarding the name of the font, I called it “Mshtakan”, which means ‘perpetual’ as this plays well with my last name, as well as being evocative of the design’s “old” nature.

    Michael Everson

  9. Thursday, September 27 2007 at 8:09 am

    Oh, and Mr Watt? You don’t have the right to alter Mshtakan and re-distribute it. The font is my intellectual property, licenced in this case to Apple. You are in violation of copyright in making it available from you website, and in violation of my licence in modifying it at all. I must insist that you cease distributing it here. In recompense you may wish to consider making a donation to the Script Encoding Initiative, http://linguistics.berkeley.edu/sei/

    Michael Everson

  10. Thursday, September 27 2007 at 12:55 pm

    Miau!: For whatever reason, this bug doesn’t affect all users. Consider yourself lucky!

    Alex: If you want to homogenize the entire internet down to a single font, then yes, that’s a great solution.

    Michael: First of all, holy shit! The Michael Everson?

    I actually do not consider this to be a bug in Mshtakan, but rather a shortcoming of OS X’s font substitution. There’s no reason the star can’t vary a lot between typefaces. The system ought to be able to somehow pick out the most appropriate general purpose glyph and avoid this problem altogether.

    I apologize for posting the font without permission. The copyright issues involved never even crossed my mind. I've removed it now.

  11. Friday, September 28 2007 at 5:12 am

    […] a perfect illustration of this, someone fixed a bug in a proprietary piece of software – font software, in this case – and posted […]

  12. Friday, September 28 2007 at 5:17 am

    I was saddened to read about this, because both of the outcomes are bad: asking people to agree not to redistribute improved/fixed versions is bad, because everyone suffers under the problems that remain unfixed. But redistributing the font after agreeing not to is bad too, because making agreements and breaking them is obviously not a good thing to do.

    I think the solution is for font software developers to find ways of making fonts that respect users’ freedom, getting paid in the process, and for users to stop agreeing to these terms which restrict them from getting on with life – by switching to GNU/Linux from their current proprietary operating system, and not using proprietary software any more.

  13. Friday, September 28 2007 at 8:12 am

    Andrew: You are correct. I hadn’t realized as I hadn’t tried testing with just specifying the alternative fonts (I jumped right in with my “Myriad Pro” substitution). And I thought I had been so clever!

  14. Friday, September 28 2007 at 11:47 am

    Although I understand the value of intellectual property, copyrights and so on, I still find that Mr. Everson’s “request” was slightly … How to say? “Jumpy”?

    Yes, the enforcing of copyright needs to be done, but since the redistribution was merely an improvement (and technically, as it fixes a bug that the original author has acknowledged, a required “improvement”) of the original and not a re-appropriation of the property, I think that the original author could have at least had the politeness to reply in a friendlier manner.

    But then I suppose that nobody likes to have holes poked in their “intellectual property”.

    [This does not, in any way, constitute an enticement or instigation of a flame war (we've all got a bit of legalese somewhere)]

  15. Friday, September 28 2007 at 1:41 pm

    Andrew: There are many Michael Eversons in the world, as it happens. However, it may very well be the case that I am the one whose reputation has proceeded him to your doorstep. Howdy. Thank you for your courteous response. Don’t forget the Script Encoding Initiative, if you are in a position to help our work.

    Dave: Apple has made an agreement with me to distribute Mshtakan. Mr Watts did not. As it happens I have filed a bug with Apple and am providing them with an improved font.

    Douglas: I didn’t “request” compliance from Andrew. I insisted on it in order to protect my intellectual property. I wish I were independently wealthy enough to give everything I do away for free. I'd love to do it. My life’s work — indeed my dharma — is to support the Universal Character Set and lesser-used languages and scripts. In the meantime, I have to make ends meet as well. It isn’t easy when one’s business model is “Psst… wanna buy an alphabet?”….

    Note: I don’t think I was impolite to Mr Watts. I don’t know who he is (and couldn’t find out from this site). I'm pretty sure that had he been distributing a font owned by a really big company he'd have had a less congenial reply than the one I gave. I admit to being alarmed. Not to being “jumpy”.

  16. Friday, September 28 2007 at 4:54 pm

    Michael: Perhaps “jumpy” is not the correct term, but there is a certain “bludgeoning” factor to your comment. I'm sure that Mr. Watt would have complied with just as much speed if you had issued a request instead of an extract of legal code that almost reminds me of a cease and desist letter. Perhaps that your comment should have been a “request”.

    I suppose that what I am trying (perhaps unsuccessfully) to say is that perhaps a less formal (or more amicable) approach would have yielded the same results. Assuming that Mr. Watt is not prone to illegally distributing copyrighted fonts on a regular basis, I see your “insistence” a little stern considering the circumstances.

    Perhaps indeed that a bigger company would have not have been so lenient, but because someone else would have done more than you does not mean that you did any less.

    I don’t know Mr. Watts, and I don’t even read his blog, I merely stumbled on this page but I couldn’t help but comment. It was the “Oh, and Mr Watt?” that spurred this on. If you were alarmed, it can hardly have been an afterthought.

  17. Saturday, September 29 2007 at 9:14 am

    When I wrote post No. 6 above, I was only thinking about the inconvenient star (about which (I had heard before). I hadn’t noticed the “solution”. So post No. 7 above was a genuine postscript. Apart from that… I don’t really see why someone whose copyright has been violated should “request” redress. I think insistence is quite reasonable.

  18. Saturday, September 29 2007 at 11:30 am

    Between a “request” and a “demand”, a request is shall we say “friendlier”, especially when conveyed through a medium such as a comment on a blog article.

    In this case a “request” and a “demand” would have yielded the same results, and thus the choice to “demand” instead of “request” is perhaps incorrect.

    Indeed “insistence” is reasonable under these circumstances, but a “request” would have been even more so. Unless of course Mr. Watt had not heeded your request, or for some reason “insisting” was easier for you than “requesting”, which would be a shame.

  19. Sunday, September 30 2007 at 4:07 am

    Perhaps this blog isn’t best served by ruminations on the sufficiency or insufficiency of my courteousness to Mr Watts.

    In the meantime I will return to my work to encode scripts and characters in the Universal Character Set. Support that work if you can, please.

  20. Sunday, September 30 2007 at 6:53 am

    Indeed, perhaps this isn’t the place.

    Mr Watts, I apologise for taking the comments slightly off-topic.

  21. Monday, October 1 2007 at 7:13 am

    […] Correct Me If I’m Mshtakan […]