Re: Font issue in quark
Re: Font issue in quark
- Subject: Re: Font issue in quark
- From: Håvard Graudo <email@hidden>
- Date: Fri, 10 Feb 2006 23:31:52 +0100
Den 8. feb. 2006 kl. 15.29 skrev Jan Bultereys:
Hi, can someone tell me the syntax to replace “missing fonts in
quark” the script works with fonts that ARE on the page, but with
“missing fonts” I don’t know how to describe the fontname.
So my question is do I need to use in this case “-9,HelveticaNeue
Condensed” or “HelveticaNeue Condensed” or “{-9,HelveticaNeue” I
tied it all but don’t have any success.
tell application "QuarkXPress Passport"
activate
tell document 1
try
set (font of every character of every text box whose
font is "-9,HelveticaNeue Condensed") to "Helvetica
CondensedOblique"
end try
end tell
end tell
Best regards,jan
Jan,
I don't think you can do it inside Quark. You can get a list of the
missing fonts like this:
---
tell document 1 of application "QuarkXPress Passport"
set allFonts to font list
set missingFonts to {}
repeat with x from 1 to (count allFonts)
if ID of item x of allFonts < 0 then
copy item x of allFonts to end of missingFonts
end if
end repeat
end tell
---
'font list' is read only and you cannot just replace the fonts (but
you could use it to decide what to do with the document.)
Text style ranges with missing fonts only returns an empty string if
you ask it for the font, so it could be *any* missing font. Could be
used if there is only one font missing.
For multiple missing fonts the only way I could think of is to repeat
through the text boxes, export the text as Xpress Tags, do a search
and replace in the text file and reimport it.
Here is something to play with:
---
set textTemp to (path to desktop from user domain as string) & "text
temp.xtg"
tell application "QuarkXPress Passport"
activate
set import styles to true
tell document 1
set theBoxes to object reference of every text box
repeat with aBox in theBoxes
select aBox
save story 1 of selection in textTemp as "TEXT"
my changeFont(textTemp)
set story 1 of selection to (alias textTemp)
set selection to null
end repeat
end tell
end tell
on changeFont(theFile)
--read file, do changes, save
end changeFont
---
Good luck,
Håvard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden