Forum Discussion
MathNotermans-9
5 years agoCommunity Member
Storyline360, Animation and GSAP ( Greensock )
Hi,
Trying to figure something out in SL360 i stumbled upon the ds-bootstrap.min.js file thats added to the lib/scripts folder when publishing a Storyline360 file. In that file are GSAP(Greensock...
JĂĽrgen_Schoene_
2 years agoCommunity Member
your script
let textStr1 = gsap.getProperty(collection[1], "textContent").replaceAll("\uE000", "f");
console.log("t1: "+textStr1);
let textStr2 = textStr1.replaceAll("\uE002", "fi");
console.log("t2: "+textStr2);
is working for me
here is the complete script for multiple replace (for Open Sans, Calibri)
var player = GetPlayer();
let someStr = gsap.getProperty(collection[1], "textContent");
someStr = someStr.replaceAll("\uE000", "f");
someStr = someStr.replaceAll("\uE001", "ff");
someStr = someStr.replaceAll("\uE002", "fi");
someStr = someStr.replaceAll("\uE003", "fl");
someStr = someStr.replaceAll("\uE004", "ffi");
someStr = someStr.replaceAll("\uE005", "ffl");
player.SetVar("debugStr", someStr);
console.log("text[1]: "+ someStr);
Important: for Lato is another decoding (no ff, ffi, ffl)
var player = GetPlayer();
let someStr = gsap.getProperty(collection[1], "textContent");
someStr = someStr.replaceAll("\uE000", "f");
someStr = someStr.replaceAll("\uE001", "fi");
someStr = someStr.replaceAll("\uE002", "fl");
player.SetVar("debugStr", someStr);
console.log("text[1]: "+ someStr);
decoding is not necessary for these fonts (but it does not interfere)
- Articulate
- Consolas
- Arial
storyline simply appends all available ligatures one after the other and numbers them
=> it must be tested individually for each font/variation - e.g. Futura Bold has 19 ligatures, but Futura Medium only 2
- MathNotermans-92 years agoCommunity Member
nice and complete explanation Jurgen...let me quickly check the font i used.
used Open Sans, so it should work as shown. Will doublecheck and fix later.- PhilMayor2 years agoSuper Hero
Even better I have to use it in a mock-up of a terminal window and Cascadia Mini has no ligatures.
Sent from my iPhone