• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bionic Reading API to ID Script

Community Beginner ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Howdy!
I just discovered Bionic Reading as an interesting way to present text to be more readable to some people, (more can be found at, https://bionic-reading.com/
and with how it works, manual fixing would take forever. Fortunately they did post a public API (works only with https tho), however my scripting skills are not that great, and would love to see how to convert this into something that can be more easily utilized from ID.

Thank you.

TOPICS
Scripting

Views

496

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

Ask support of this service

Remember, never say you can't do something in InDesign, it's always just a question of finding the right workaround to get the job done. © David Blatner

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2022 May 18, 2022

Copy link to clipboard

Copied

LATEST

Hi @MetalWeaveGames , Looks like all it’s doing is bolding the first half of each word, which you could do with InDesign’s scripting. Here’s an example where the first half of each word in a selection will be bolded—you’ll get an error if there’s no text selected:

 

//the font names
var tfn = "Helvetica	Regular"
var bfn = "Helvetica	Bold"

var sel = app.activeDocument.selection[0];
sel.appliedFont = tfn;
var t = sel.words;  
var c, er


for (var i = 0; i < t.length; i++){
    c = t[i].characters
    er = Math.floor((c.length)/2)
    t[i].characters.itemByRange(0,er-1).appliedFont = bfn
};   

 

 

Screen Shot 9.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines