Export from pages to word causes font issues with office compatible fonts

When I export a documents from Pages into doc format, in which an office compatible font was used and bolds or italics are in the text, the font is changed from, for example, "Arial" to "Arial Bold" in all the bolds selected in the text, causing compatibility issues when the document is oppened in MS Office or windows. If I use the helvetica font, the document open correctly in MS Word, with all the bolds correctly identified (Helvetica font + bold, as opposed to "Helvetica Bold" font)



Can anyone please help? Or is this an Apple bug? This happens wether a document was created in pages or is originally open from an office document.




Thanks!

Pages-OTHER, Mac OS X (10.7.2)

Posted on Dec 14, 2011 4:45 AM

Reply
7 replies

Dec 14, 2011 8:36 AM in response to PeterBreis0807

I have Office 2011 installed, which installs some fonts in the system, namely Arial, Times and a few others like Cambria, but I made sure I did not have duplicate fonts active in Fontbook.


I've tried changing the active font from Apple's to MS's, with mixed results: Arial Narrow now seems to work properly between Pages and Office, but Times New Roman, Arial and fonts exclusive to MS like Cambria and Calibri still present the same behaviour.


Thanks for your help!

Dec 14, 2011 12:28 PM in response to PeterBreis0807

The set of fonts delivered with M…oSoft Office 2011 behave well under 10.7.2 in Pages as in other apps.

What the OP get is the normal behavior.


When an Apple application apply Bold to a font, it doesn't build a faux style like M…oSoft products do.

It apply the font designed as bold by the font author.

When we ask Arial bolded the font used is not "Arial", it's "Arial-BoldMT"

When we ask Times New Roman bolded, the font used is not "TimesNewRomanPSMT", it's "TimesNewRomanPS-BoldMT".

Below you see the styles descriptors with the fonts names.

User uploaded file

What the OP get isn't what he assumed to get but it's the logical behavior. The process export the correct fonts, those built by the fonts designers.

If something requires some changes, it's Word's behavior which doesn't take care of Intellectual Property (when it's related to products which aren't designed by M…oSoft).


Two or three days ago, in a thread, I posted a script building a list of every fonts installed in the active system allowing us to know exactly which font is used in applications designed by Apple.

Here is an enhanced version.


--{code}

--[SCRIPT list_fonts_and_styles]

(*

Yvan KOENIG (VALLAURIS, France)

2011/12/11 using "tell every typeface" dramatically fasten the script.

2011/12/12 build automatically the Bold table

*)

property liste_des_polices : {}

property liste_display_name : {}

property liste_des_noms_de_famille : {}

property liste_des_styles : {}

property liste_PostScript_name : {}


on run

local rapport, IF_loc, OR_loc, MAX_loc, ROW_loc, LOOKUP_loc, delim_loc, nb_bolds

tell application "Font Book" to tell every typeface


(*

Extract the list of names of available type faces *)

set my liste_des_polices to name

set my liste_display_name to displayed name


(*

Extract the list of family names of available type faces *)

set my liste_des_noms_de_famille to family name


(*

Extract the list of style names of available type faces *)

set my liste_des_styles to style name

set my liste_PostScript_name to PostScript name

end tell -- FontBook…


(*

Add family name and style name at end of every item in the list of names *)

repeat with i from 1 to count of my liste_des_polices

set itemi of my liste_des_polices to my recolle({itemi of my liste_des_polices, itemi of my liste_display_name, itemi of my liste_des_noms_de_famille, itemi of my liste_des_styles, itemi of my liste_PostScript_name}, tab)

end repeat


(*

Build a file path *)

set rapport to (path to temporary items as text) & "Fonts List.txt"


(*

Write the list in a text file *)

my writeTo(rapport, my recolle({my recolle({"name", "display name", "family name", "style name", "PostScript name"}, tab), my liste_des_polices}, return), text, false)


(*

Open the text file in Numbers *)

tell application "Numbers"


openrapport


(*

Get several localized functions names *)

set IF_loc to my getLocalizedTabularString("Numbers", "IF") & "("

set OR_loc to my getLocalizedTabularString("Numbers", "OR")

set MAX_loc to my getLocalizedTabularString("Numbers", "MAX")

set ROW_loc to my getLocalizedTabularString("Numbers", "ROW") & "()"

set LOOKUP_loc to my getLocalizedTabularString("Numbers", "LOOKUP") & "("

set delim_loc to my getLocalizedDelimiter()


tell document 1 to tell sheet 1

set name of table 1 to "Main"

tell table 1


add column after last column


-- set nbr to count rows

set selection range to range "A1" (* Required before creating an header row *)

(*

Create an header row *)

my selectSubMenu("Numbers", 6, 10, 1 + 1) (* Create one header row *)

(*

Fill the header row *)

repeat with c from 1 to 5

tell column c to set value of cell 1 to value of cell 2

end repeat

(*

Remove the original title row *)


removerow 2

(*

Insert in F2 the formula : =IF(OR(D2="Bold",D2="10 Bold"),MAX(F$1:F1)+1,"") *)

set value of cell "F2" to "=" & IF_loc & OR_loc & "(D2=" & quote & "Bold" & quote & delim_loc & "D2=" & quote & "10 Bold" & quote & ")" & delim_loc & MAX_loc & "(F$1:F1)+1" & delim_loc & quote & quote & ")"

(*

Prepare the column for Fill Down *)

set selection range to range ("F2:F" & (count rows))

(*

Apply Fill Down *)

my selectSubMenu("Numbers", 5, 10, 2) (* Fill Down *)

(*

Replace the formulas by their results to allow us to insert the formula =MAX(F) in F1 *)

my selectmenu("Numbers", 4, 5) (* Copy *)

my selectmenu("Numbers", 4, 8) (* Paste Values *)

(*

Insert the formula = MAX(F) to get the count of bold fonts available ) *)

set value of cell "F1" to "=" & MAX_loc & "(F)"

(*

Extract the count of bold fonts available ) *)

set nb_bolds to value of cell "F1"

end tell -- table 1

make new table with properties {name:"Bold", column count:3, row count:nb_bolds + 1}

tell table "Bold"


removecolumn 1 (* No need for header column *)


removerow 1 (* No need for header row *)

(*

Insert in A1 the formula : =LOOKUP(ROW(),Main :: $F,Main :: C) *)

set value of cell "A1" to "=" & LOOKUP_loc & ROW_loc & delim_loc & "Main :: $F" & delim_loc & "Main :: C)"

set selection range to range "A1:B1"

my selectSubMenu("Numbers", 5, 10, 1) (* Fill to Right *)

set selection range to range ("A1:B" & (count rows))

my selectSubMenu("Numbers", 5, 10, 2) (* Fill Down *)

end tell -- table "Bold"

end tell -- document

end tell -- Numbers



(*

Clear the properties used to accelerate the script. *)

set my liste_des_polices to {}

set my liste_display_name to {}

set my liste_des_noms_de_famille to {}

set my liste_des_styles to {}

set my liste_PostScript_name to {}


end run


--=====


on decoupe(t, d)

local oTIDs, L

set oTIDs to AppleScript's text item delimiters

set AppleScript's text item delimiters to d

set L to text items of t

set AppleScript's text item delimiters to oTIDs

return L

end decoupe


--=====


on recolle(L, d)

local oTIDs, t

set oTIDs to AppleScript's text item delimiters

set AppleScript's text item delimiters to d

set t to L as text

set AppleScript's text item delimiters to oTIDs

return t

end recolle


--=====

(*

Handler borrowed to Regulus6633 - http://macscripter.net/viewtopic.php?id=36861

*)

on writeTo(targetFile, theData, dataType, apendData)


-- targetFile is the path to the file you want to write


-- theData is the data you want in the file.


-- dataType is the data type of theData and it can be text, list, record etc.


-- apendData is true to append theData to the end of the current contents of the file or false to overwrite it

try

set targetFile to targetFile as text

set openFile to open for accessfiletargetFile with write permission

if apendData is false then set eof of openFile to 0


writetheDatatoopenFilestarting ateofasdataType


close accessopenFile

return true

on error

try


close accessfiletargetFile

end try

return false

end try

end writeTo


--=====


on get_iWorkNum(a)

local verNum

tell application a to set verNum to item 1 of my decoupe(get version, ".")

if (a is "Numbers" and verNum is "2") or (a is "Pages" and verNum is "4") then

return "09"

else

return "11"

end if

end get_iWorkNum


--=====

(*


Useful to get function’s localized name if we need to build formulas

examples:

set OFFSET_loc to my getLocalizedTabularString("Numbers", "OFFSET")

set ADDRESS_loc to my getLocalizedTabularString(theApp, "ADDRESS")

set INDIRECT_loc to my getLocalizedTabularString(theApp, "INDIRECT")


Requires :

decoupe()

get_iWorkNum()

getLocalizedName()

*)

on getLocalizedTabularString(theApp, x)

local path2app, p2bndl

tell applicationtheApp to activate


tell application "System Events"

set path2app to (application file of application processtheApp as text)


if exists folder (path2app & "Contents:Frameworks:") then

set p2bndl to path2app & "Contents:Frameworks:SFTabular.framework:Versions:A:Resources:"

else

set p2bndl to (path to application support as text) & "iWork '" & my get_iWorkNum(theApp) & ":Frameworks:SFTabular.framework:Versions:A:Resources:"

end if

return my getLocalizedName(theApp, x, p2bndl)

end tell

end getLocalizedTabularString


--=====


on getLocalizedName(a, x, f)

tell application a to return localized string x from table "Localizable" in bundle file f

end getLocalizedName


--=====

(*

Set the parameter delimiter which must be used in Numbers formulas

*)

on getLocalizedDelimiter()

if character 2 of (0.5 as text) is "." then

return ","

else

return ";"

end if

end getLocalizedDelimiter


--=====

(*

my selectMenu("Pages",5, 12)

==== Uses GUIscripting ====

*)

on selectmenu(theApp, mt, mi)

tell applicationtheApp


activate

tell application "System Events" to tell process theApp to tell menu bar 1 to ¬

tell menu bar itemmt to tell menu 1 to clickmenu itemmi

end tell -- application theApp

end selectmenu


--=====

(*

my selectSubMenu("Pages",6, 4, 26)

==== Uses GUIscripting ====

*)

on selectSubMenu(theApp, mt, mi, ms)


tell applicationtheApp


activate

tell application "System Events" to tell process theApp to tell menu bar 1 to ¬

tell menu bar item mt to tell menu 1 to tell menu item mi to tell menu 1 to click menu item ms

end tell -- application theApp

end selectSubMenu


--=====

--[/SCRIPT]

--{code}


Yvan KOENIG (VALLAURIS, France) mercredi 14 décembre 2011 21:24:34

iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2

My iDisk is : <http://public.me.com/koenigyvan>

Please : Search for questions similar to your own before submitting them to the community



Dec 15, 2011 2:07 AM in response to PeterBreis0807

Good call! When I do the same with TextEdit, the word document is correctly opened in word (mac&windows)! I have manually selected all the fonts (in Font Book) to the Apple versions, but the behaviour in Pages remains the same.


I've also noted that TextEdit exports to the "docx" format, while Pages exports to the "doc" format… could it be part of the problem?



Thank you for your help in this matter!

Dec 15, 2011 2:16 AM in response to KOENIG Yvan

I'm sure you are probably right, but it doesn't seem to be the case in this matter: even when I use fonts provided by MS (like cambria), which have their own versions for bold and italic (so I suppose they are not faux stylings), the exported document still loses the reference to the styling.


You are right about one thing, and that is that the resulting document, when opened in windows and mac, look very diferent: on the mac, even in office, the document looks the same, so I suppose the system is still, somehow, finding the bold and italic font version; in windows, the system cannot find a corresponding font and the text loses all format, with the format reverting to a system default.


And this was something that I am sure has only changed recently: I've worked with the same people I am changing files with for quite a while.


Thank you for your input!!

Dec 15, 2011 2:42 AM in response to dadro

Here is the list of fonts embedded in Calibri and Cambria:


Calibri

Calibri-Italic

Calibri-Bold

Calibri-BoldItalic


Cambria

Cambria-Italic

Cambria-Bold

Cambria-BoldItalic


Apple applications use the font matching the asked style.

iWork applications behave this way since day one.

There is a workaround : use fonts which are available as separate files for the different styles.

Alas I don't know many of them.


I have some reasons when I write that when somebody need to exchange files with Office users, iWork isn't the tool to use.


Better work with LibreOffice.


You may try to reinstall Pages v 4.0.5 for see. Maybe its export code was replacing the bold fonts by the standard ones plus the style descriptor.

If 4.0.5 behave this way, file a request in the Feedback channel.


Yvan KOENIG (VALLAURIS, France) jeudi 15 décembre 2011 11:38:37

iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2

My iDisk is : <http://public.me.com/koenigyvan>

Please : Search for questions similar to your own before submitting them to the community



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Export from pages to word causes font issues with office compatible fonts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.