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

RE: RTFFromRange:documentAttributes: and Windows incompatibility?


  • Subject: RE: RTFFromRange:documentAttributes: and Windows incompatibility?
  • From: "Kenny Millar" <email@hidden>
  • Date: Fri, 14 Jul 2006 14:29:08 +0100
  • Organization: Kenny Millar

They both display fine on my XP system.
-Kenny

-----Original Message-----
From: cocoa-dev-bounces+kennymillar=email@hidden
[mailto:cocoa-dev-bounces+kennymillar=email@hidden] On Behalf Of
Fredrik Olsson
Sent: 14 July 2006 14:09
To: Cocoa-dev
Subject: RTFFromRange:documentAttributes: and Windows incompatibility?

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

 _______________________________________________
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

References: 
 >RTFFromRange:documentAttributes: and Windows incompatibility? (From: Fredrik Olsson <email@hidden>)

  • Prev by Date: Re: Detecting Internet
  • Next by Date: Re: RTFFromRange:documentAttributes: and Windows incompatibility?
  • Previous by thread: RTFFromRange:documentAttributes: and Windows incompatibility?
  • Next by thread: Re: RTFFromRange:documentAttributes: and Windows incompatibility?
  • Index(es):
    • Date
    • Thread