• 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
RTFFromRange:documentAttributes: and Windows incompatibility?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RTFFromRange:documentAttributes: and Windows incompatibility?


  • Subject: RTFFromRange:documentAttributes: and Windows incompatibility?
  • From: Fredrik Olsson <email@hidden>
  • Date: Fri, 14 Jul 2006 15:09:16 +0200

How can I force Cocoa to write font names that Windows Wordpad can recognize?

Example: Cocoa writes ArialMT. Windows 2k will not recognize it but use Arial instead. Windows XP will not recognize it either and do even worse: it will use a bitmapped system font.

The hidden class NSRTFWriter have a private method called _plainFontNameForFont:, and it do return "ArialMT" for [NSFont fontWithName:@"Arial" size:10.0] argument. So I guess this is pretty close to where the blame is. But how can I whip up a remedy?


I attach three files, all with he same visual content. All three render equally in TextEdit, or any other Cocoa app tested.
test_macrtf.rtf - Is saved from TextEdit, using RTFFromRange:documentAttributes: in code gives same result. Displays ok with win2k, terrible with winxp.
test_winrtf.rtf - Is saved from Wordpad, it can be opened and displays identically with Cocoa and Wordpad for both 2k and xp.



// Fredrik Olsson

Attachment: test_winrtf.rtf
Description: RTF file

Attachment: test_macrtf.rtf
Description: RTF file

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: RTFFromRange:documentAttributes: and Windows incompatibility?
      • From: Julio Cesar Silva dos Santos <email@hidden>
    • RE: RTFFromRange:documentAttributes: and Windows incompatibility?
      • From: "Kenny Millar" <email@hidden>
  • Prev by Date: Re: Disabling Certain Title bar controls
  • Next by Date: Re: Detecting Internet
  • Previous by thread: Re: Screensaver password override possible?
  • Next by thread: RE: RTFFromRange:documentAttributes: and Windows incompatibility?
  • Index(es):
    • Date
    • Thread