Results 1 to 5 of 5

Thread: Batch-Convert to Preferred Rich Text Font

  1. #1

    Default Batch-Convert to Preferred Rich Text Font

    Hi Michael,

    Does EagleFiler currently provide a way to convert the rich text font of multiple selected .rtf files to the font chosen in EagleFiler's Preferences? I'm transferring a bunch of files from Mori to EagleFiler and would like to clean up the mess of fonts, sizes, etc.. I have Scrivener installed and could use it as an intermediary for this task, but obviously that would be more time-consuming.

    Thanks in advance for letting me know.

    Sam.

  2. #2

    Default

    Quote Originally Posted by sammy View Post
    Does EagleFiler currently provide a way to convert the rich text font of multiple selected .rtf files to the font chosen in EagleFiler's Preferences?
    I just wrote the Change Rich Text Font script to do this.

  3. #3

    Default

    Great - thanks very much, Michael.

  4. #4

    Default

    Hi Michael,

    In case it's of any use to anyone, I'm posting below a way to modify the Change Rich Text Font script so that it preserves bold, italics, and bold-italics. (The example uses Helvetica 13, but can be modified to any font that includes bold and italics).

    The modification involves replacing these two lines in the current script...

    set font of text of front document to "Helvetica"
    set size of text of front document to 13

    ...with the following lines...

    tell text of front document
    set (font of every attribute run whose (font contains "BoldOblique" or font contains "BoldItalic")) to "Helvetica-BoldOblique"
    set (font of every attribute run whose (font contains "Oblique" or font contains "Italic")) to "Helvetica-Oblique"
    set (font of every attribute run whose font contains "Bold") to "Helvetica-Bold"
    set (font of every attribute run whose (font starts with "HelveticaNeue" or font does not start with "Helvetica")) to "Helvetica"
    delay 1
    set size to 13
    end tell

    As always, there may be a much better way to do this than the one I've posted here.

  5. #5

    Default

    Whoops - that last one missed some cases. Here's an improved version.

    ------
    tell text of front document
    set font of every attribute run whose ((font contains "Bold" or font contains "Black") and (font contains "Italic" or font contains "Oblique")) to "Helvetica-BoldOblique"
    set font of every attribute run whose ((font does not contain "Helvetica-BoldOblique") and (font contains "Bold" or font contains "Black")) to "Helvetica-Bold"
    set font of every attribute run whose ((font does not contain "Helvetica-BoldOblique") and (font contains "Italic" or font contains "Oblique")) to "Helvetica-Oblique"
    set font of every attribute run whose (font starts with "HelveticaNeue" or font does not start with "Helvetica") to "Helvetica"
    delay 1
    set size to 13
    end tell
    ------

Similar Threads

  1. Batch change of title and filename prefix or suffix
    By domellen in forum EagleFiler
    Replies: 11
    Last Post: 12-16-2010, 01:03 PM
  2. Store web site as rich text
    By towb in forum EagleFiler
    Replies: 10
    Last Post: 10-28-2008, 03:23 PM
  3. Replies: 4
    Last Post: 10-16-2008, 05:07 PM
  4. Replies: 0
    Last Post: 08-21-2007, 05:22 AM
  5. Feature request: "rich" drag and drop from EF
    By brab in forum EagleFiler
    Replies: 1
    Last Post: 06-06-2007, 09:25 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •