Editorial Workflows

Fontomatic

public workflow

Install Workflow

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: This markdown workflow provides options to select various fonts, sizes, and heading styles before previewing or creating a PDF.

There is an option to save the settings to a local (fontomatic.txt) file. If a settings file is present, the workflow will go directly to the output options. The settings can also be cleared, to make new selections.

It’s intended for use with everyday documents, letters, notes, etc. to add a few basic styles before emailing or printing. It’s also useful for quickly testing different font combinations and sizes before digging into templates and style sheets.

Shared by: Larry Stevens

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
*** READ ME ***
Value
The font selection lists are in the variables (FontList, SizeList, and StyleList) marked blue, directly below, and can be edited to your preferences. The HTML template marked green, further down, can also be edited for additional styles. The workflow contains one big loop that usually executes once, but runs a second time if the settings are cleared. Inside the loop are two branches (marked purple) depending on whether settings have been saved. If settings are found, it reads them into variables. If settings are not found (or cleared), it presents a series of selection lists and stores the results in variables. After that, it creates the HTML document and presents the output dialog. The workflow ends when an output is chosen or if cancel is tapped at any point.
Set Variable ?
Variable Name
FontList
Value
Avenir Courier Futura Georgia Helvetica Optima Palatino Times Verdana
Set Variable ?
Variable Name
SizeList
Value
10pt 11pt 12pt 13pt 14pt 15pt 16pt 18pt
Set Variable ?
Variable Name
StyleList
Value
Italic font-style: italic; Normal Weight font-weight: lighter; Uppercase text-transform: uppercase; More Letter Space letter-spacing: 0.05em; Centered text-align: center; More Vertical Space margin: 1.5em 0; Less Vertical Space margin: -0.2em 0; Gray Text color: #666;
Set Variable ?
Variable Name
ForLoop
Value
1 2
Repeat… ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
Match Group
0 (entire match)
Reverse
OFF
Get File Contents ?
File Name
fontomatic.txt
In Dropbox
OFF
If File Does Not Exist
  • Empty Output
  • Stop Workflow
Set Variable ?
Variable Name
Settings
Value
Input
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Fontomatic Settings
Find ?
Search for
(?<=bf\=)([\s\w]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
BodyFont
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=bs\=)([\w])*
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
BodySize
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=hf\=)([\s\w]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
HeadingFont
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=hs\=)([\s\w\-\,\.\:\;\#]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
HeadingStyles
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=qf\=)([\s\w]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
QuoteFont
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=qs\=)([\w]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
QuoteSize
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=lf\=)([\s\w]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
ListFont
Value
Input
Set Variable ?
Variable Name
Settings
Value
Settings
Find ?
Search for
(?<=ls\=)([\w]*)
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
ListSize
Value
Input
Set Variable ?
Variable Name
ClearSettings
Value
Clear Settings
…End If
Set Variable ?
Variable Name
Settings
Value
Settings
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Fontomatic Settings
Select from List ?
Title
Select Options
List (Lines)
Body Font Body Size Heading Font Heading Styles Blockquote Font Blockquote Size List Font List Size Save Settings
Multiple Selection
ON
Show in Popover
OFF
Repeat… ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
Match Group
0 (entire match)
Reverse
OFF
Set Variable ?
Variable Name
Option
Value
Input
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Body Font
Select from List ?
Title
Body Font
List (Lines)
FontList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
BodyFont
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Body Size
Select from List ?
Title
Body Size
List (Lines)
SizeList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
BodySize
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Heading Font
Select from List ?
Title
Heading Font
List (Lines)
FontList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
HeadingFont
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Heading Styles
Select from List ?
Title
Heading Styles
List (Lines)
StyleList
Multiple Selection
ON
Show in Popover
OFF
Find / Replace ?
Find
\n
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
HeadingStyles
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Blockquote Font
Select from List ?
Title
Blockquote Font
List (Lines)
FontList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
QuoteFont
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Blockquote Size
Select from List ?
Title
Blockquote Size
List (Lines)
SizeList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
QuoteSize
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
List Font
Select from List ?
Title
List Font
List (Lines)
FontList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
ListFont
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
List Size
Select from List ?
Title
List Size
List (Lines)
SizeList
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
ListSize
Value
Input
…End If
Set Variable ?
Variable Name
Option
Value
Option
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Save Settings
Set File Contents ?
File Name
fontomatic.txt
In Dropbox
OFF
New Text
Fontomatic Settings bf=BodyFont; bs=BodySize; hf=HeadingFont; hs=HeadingStyles qf=QuoteFont; qs=QuoteSize; lf=ListFont; ls=ListSize; This file can be edited manually, or deleted to clear settings.
If File Does Not Exist
  • Create
  • Stop Workflow
Show HUD ?
HUD Text
Settings Saved
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"
…End If
Set Variable ?
Variable Name
ClearSettings
Value
…End Repeat
…End If
Document Text ?
Folded Text
  • Include
  • Replace with:
Convert Markdown ?
Markdown Extras: Footnotes
ON
…Auto-Links
ON
…Strikethrough (~~x~~)
ON
…Superscript (^x)
ON
…Tables
ON
…Smart Quotes etc.
ON
…Strip Metadata Headers
OFF
Generate Text ?
Text
<!DOCTYPE html> <html> <head><meta charset="utf-8"/> <style> body { font-family: BodyFont; font-size: BodySize; margin: 20px; } h1, h2, h3, h4, h5, h6 { font-family: HeadingFont; HeadingStyles } blockquote { font-family: QuoteFont; font-size: QuoteSize; } ol, ul { font-family: ListFont; font-size: ListSize; } a { color: darkblue; text-decoration: none; } </style> </head> <body> Input </body> </html>
Set Variable ?
Variable Name
DocHTML
Value
Input
Show Alert ?
Title
HTML Document
Message
Body: BodyFont BodySize Headings: HeadingFont Quotes: QuoteFont QuoteSize Lists: ListFont ListSize
Button 1
Preview
Output Value
preview
Button 2
Create PDF
Output Value
pdf
Button 3
%var:ClearSettings
Output Value
clear
Show Cancel Button
ON
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
preview
Show HTML ?
HTML
DocHTML
Title
Fontomatic Preview
Base URL
None
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
pdf
Set Variable ?
Variable Name
PDF Filename
Value
File Name.pdf
Generate PDF Document ?
Source
  • HTML Code
  • Web URL
HTML/URL
DocHTML
Paper Size
  • A4
  • Letter
Page Margins
1.5cm 2.5cm 1.5cm 2.5cm
Filename
%var:PDF Filename
in Dropbox
OFF
Overwrite
ON
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
Input
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
PDFOutput
Wait until Loaded
OFF
Reveal Browser Automatically
ON
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
clear
Set File Contents ?
File Name
fontomatic.txt
In Dropbox
OFF
New Text
If File Does Not Exist
  • Create
  • Stop Workflow
Show HUD ?
HUD Text
Settings Cleared
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"
…End If
…End Repeat