• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to patch the layout or some chars?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to patch the layout or some chars?


  • Subject: Re: How to patch the layout or some chars?
  • From: email@hidden
  • Date: Sat, 23 Feb 2002 12:31:56 -0800

In the cocoa text system, is it possible to have a whole word (some
specific character sequence) to be displayed as one glyph? More
precisely, i have a text storage that contains the word '\alpha', and I
would like to see its text view display the alpha character on screen.

I think in theory you might possibly be able to replace the glyph generation mechanism that Cocoa uses, but if you can do that (which I'm not sure of), I imagine it would be really, really hairy. Come to think of it, you might be able to do this my plugging into the "ligature" support in Cocoa, which handles exactly this sort of behavior ("ffi" turning into the ffi ligature character, etc.). I don't know if that's extensible or not, though, and you'd still have weird usability issues if your textview is editable. If they're possible, these options are probably documented in the doc for the Cocoa text system.
However, the typical way to achieve what you're trying to do would be to search for "\alpha" and replace it with the Unicode character you want prior to displaying the content to the user. Unless there's really a problem with doing it on the pipe in, I'd recommend that as being much easier and requiring you to read a lot less doc. :->

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: 2D menu
  • Next by Date: Re: How to store file metadata?
  • Previous by thread: How to patch the layout or some chars?
  • Next by thread: How to store file metadata?
  • Index(es):
    • Date
    • Thread