0

I'm trying to find/replace problematic fonts in Keynote, and found this script to change fonts using JXA, but need to scan every character and text object for the offending font.

I've tried this to start, but the conditional isn't working. Help!

PROBLEM_FONT = 'Arial'
REPLACEMENT_FONT = 'Helvetica'

document = Application('Keynote').documents[0]
for slide in document.slides
  for textItem in slide.textItems
    if textItem.objectText.font == PROBLEM_FONT
        textItem.objectText.font = REPLACEMENT_FONT
4

1 に答える 1