samiartur / Character-Variant-Java-Script-for-Indesign

This script make possible access "CVxx" features in Indesign
MIT License
3 stars 0 forks source link

hlig + character variant javascript for InDesign #1

Open dhinostroza opened 2 years ago

dhinostroza commented 2 years ago

Hi, Sami: Your Character variant jsx is working as expected. I need to combine 'hlig' + 'CV83' for a combination of three characters (q́ꝫ). Where do I add the hlig to your javascript? Best, Daniel

samiartur commented 2 years ago

Hi Daniel, my script is only for CV. You need to do another script to hlig. I am on vacation here in Brazil and this week I can't help You. I am Sorry. Regards Sami A. Mandelbaum

⁣Obter o TypeApp para Android ​

Em 22 de dez de 2021 17:09, em 17:09, dhinostroza @.***> escreveu:

Hi, Sami: Your Character variant jsx is working as expected. I need to combine 'hlig' + 'CV83' for a combination of three characters (q́ꝫ). Where do I add the hlig to your javascript? Best, Daniel

-- Reply to this email directly or view it on GitHub: https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

samiartur commented 2 years ago

Hi Daniel,

my script is only for CV.

You need to do another script to hlig.

I am on vacation here in Brazil and this week I can't help You.

Next monday I Will bem back.

I am Sorry.

Regards

Sami A. Mandelbaum

⁣Obter o TypeApp para Android ​

Em 22 de dez de 2021 17:09, em 17:09, dhinostroza @.***> escreveu:

Hi, Sami: Your Character variant jsx is working as expected. I need to combine 'hlig' + 'CV83' for a combination of three characters (q́ꝫ). Where do I add the hlig to your javascript? Best, Daniel

-- Reply to this email directly or view it on GitHub: https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

dhinostroza commented 2 years ago

Hi, Sami: Although cv83 works nicely with your script, it doesn't recognize the second variant (cv83,2). It seems your script only accepts two numbers? I've tried creating my own "hlig" script but just changing cvXX to hlig didn't work. Best regards, Daniel

samiartur commented 2 years ago

Hi Daniel, Character Variant Features only accepts 2 numbers from 01-99. You can do another character variant "cv84" Please take a look at my new CV script attached. Unfortunally You can't apply 2 CV's in the same text selection, the second CV removes the first one. Regards Sami

On 13/01/2022 13:42:09, dhinostroza @.> wrote: Hi, Sami: Although cv83 works nicely with your script, it doesn't recognize the second variant (cv83,2). It seems your script only accepts two numbers? I've tried creating my own "hlig" script but just changing cvXX to hlig didn't work. Best regards, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1012311217], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRSJJKJFND6LJYAUZODUV36GDANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.> // Sami Artur Mandelbaum - 2022 // São Paulo - Brazil

targetengine "session"

var palette = new Window("palette"); palette.text = "Character Variants"; palette.orientation = "row"; palette.alignChildren = ["left","top"]; palette.spacing = 10; palette.margins = 16;

// GROUP1 // ====== var group1 = palette.add("group", undefined, {name: "group1"}); group1.orientation = "column"; group1.alignChildren = ["fill","top"]; group1.spacing = 10; group1.margins = 0;

// PANEL1 // ====== var panel1 = group1.add("panel", undefined, undefined, {name: "panel1"}); panel1.text = "Column 1"; panel1.preferredSize.height = 205; panel1.orientation = "column"; panel1.alignChildren = ["left","top"]; panel1.spacing = 10; panel1.margins = 10;

var checkbox1 = panel1.add("checkbox", undefined, undefined, {name: "checkbox1"}); checkbox1.text = "CV01";

var checkbox2 = panel1.add("checkbox", undefined, undefined, {name: "checkbox2"}); checkbox2.text = "CV02";

var checkbox3 = panel1.add("checkbox", undefined, undefined, {name: "checkbox3"}); checkbox3.text = "CV03";

var checkbox4 = panel1.add("checkbox", undefined, undefined, {name: "checkbox4"}); checkbox4.text = "CV04";

var checkbox5 = panel1.add("checkbox", undefined, undefined, {name: "checkbox5"}); checkbox5.text = "CV05";

var checkbox6 = panel1.add("checkbox", undefined, undefined, {name: "checkbox6"}); checkbox6.text = "CV06";

var checkbox7 = panel1.add("checkbox", undefined, undefined, {name: "checkbox7"}); checkbox7.text = "CV07";

var checkbox8 = panel1.add("checkbox", undefined, undefined, {name: "checkbox8"}); checkbox8.text = "CV08";

var checkbox9 = panel1.add("checkbox", undefined, undefined, {name: "checkbox9"}); checkbox9.text = "CV09";

var checkbox10 = panel1.add("checkbox", undefined, undefined, {name: "checkbox10"}); checkbox10.text = "CV10";

var checkbox11 = panel1.add("checkbox", undefined, undefined, {name: "checkbox11"}); checkbox11.text = "CV11";

var checkbox12 = panel1.add("checkbox", undefined, undefined, {name: "checkbox12"}); checkbox12.text = "CV12";

var checkbox13 = panel1.add("checkbox", undefined, undefined, {name: "checkbox13"}); checkbox13.text = "CV13";

var checkbox14 = panel1.add("checkbox", undefined, undefined, {name: "checkbox14"}); checkbox14.text = "CV14";

var checkbox15 = panel1.add("checkbox", undefined, undefined, {name: "checkbox15"}); checkbox15.text = "CV15";

var checkbox16 = panel1.add("checkbox", undefined, undefined, {name: "checkbox16"}); checkbox16.text = "CV16";

var checkbox17 = panel1.add("checkbox", undefined, undefined, {name: "checkbox17"}); checkbox17.text = "CV17";

var checkbox18 = panel1.add("checkbox", undefined, undefined, {name: "checkbox18"}); checkbox18.text = "CV18";

var checkbox19 = panel1.add("checkbox", undefined, undefined, {name: "checkbox19"}); checkbox19.text = "CV19";

var checkbox20 = panel1.add("checkbox", undefined, undefined, {name: "checkbox20"}); checkbox20.text = "CV20";

// GROUP2 // ====== var group2 = palette.add("group", undefined, {name: "group2"}); group2.orientation = "column"; group2.alignChildren = ["fill","top"]; group2.spacing = 10; group2.margins = 0;

// PANEL2 // ====== var panel2 = group2.add("panel", undefined, undefined, {name: "panel2"}); panel2.text = "Column 2"; panel2.preferredSize.height = 205; panel2.orientation = "column"; panel2.alignChildren = ["left","top"]; panel2.spacing = 10; panel2.margins = 10;

var checkbox21 = panel2.add("checkbox", undefined, undefined, {name: "checkbox21"}); checkbox21.text = "CV21";

var checkbox22 = panel2.add("checkbox", undefined, undefined, {name: "checkbox22"}); checkbox22.text = "CV22";

var checkbox23 = panel2.add("checkbox", undefined, undefined, {name: "checkbox23"}); checkbox23.text = "CV23";

var checkbox24 = panel2.add("checkbox", undefined, undefined, {name: "checkbox24"}); checkbox24.text = "CV24";

var checkbox25 = panel2.add("checkbox", undefined, undefined, {name: "checkbox25"}); checkbox25.text = "CV25";

var checkbox26 = panel2.add("checkbox", undefined, undefined, {name: "checkbox26"}); checkbox26.text = "CV26";

var checkbox27 = panel2.add("checkbox", undefined, undefined, {name: "checkbox27"}); checkbox27.text = "CV27";

var checkbox28 = panel2.add("checkbox", undefined, undefined, {name: "checkbox28"}); checkbox28.text = "CV28";

var checkbox29 = panel2.add("checkbox", undefined, undefined, {name: "checkbox29"}); checkbox29.text = "CV29";

var checkbox30 = panel2.add("checkbox", undefined, undefined, {name: "checkbox30"}); checkbox30.text = "CV30";

var checkbox31 = panel2.add("checkbox", undefined, undefined, {name: "checkbox31"}); checkbox31.text = "CV31";

var checkbox32 = panel2.add("checkbox", undefined, undefined, {name: "checkbox32"}); checkbox32.text = "CV32";

var checkbox33 = panel2.add("checkbox", undefined, undefined, {name: "checkbox33"}); checkbox33.text = "CV33";

var checkbox34 = panel2.add("checkbox", undefined, undefined, {name: "checkbox34"}); checkbox34.text = "CV34";

var checkbox35 = panel2.add("checkbox", undefined, undefined, {name: "checkbox35"}); checkbox35.text = "CV35";

var checkbox36 = panel2.add("checkbox", undefined, undefined, {name: "checkbox36"}); checkbox36.text = "CV36";

var checkbox37 = panel2.add("checkbox", undefined, undefined, {name: "checkbox37"}); checkbox37.text = "CV37";

var checkbox38 = panel2.add("checkbox", undefined, undefined, {name: "checkbox38"}); checkbox38.text = "CV38";

var checkbox39 = panel2.add("checkbox", undefined, undefined, {name: "checkbox39"}); checkbox39.text = "CV39";

var checkbox40 = panel2.add("checkbox", undefined, undefined, {name: "checkbox40"}); checkbox40.text = "CV40";

// GROUP3 // ====== var group3 = palette.add("group", undefined, {name: "group3"}); group3.orientation = "row"; group3.alignChildren = ["left","center"]; group3.spacing = 10; group3.margins = 0;

// PANEL3 // ====== var panel3 = group3.add("panel", undefined, undefined, {name: "panel3"}); panel3.text = "Column 3"; panel3.orientation = "column"; panel3.alignChildren = ["left","top"]; panel3.spacing = 10; panel3.margins = 10;

var checkbox41 = panel3.add("checkbox", undefined, undefined, {name: "checkbox41"}); checkbox41.text = "CV41";

var checkbox42 = panel3.add("checkbox", undefined, undefined, {name: "checkbox42"}); checkbox42.text = "CV42";

var checkbox43 = panel3.add("checkbox", undefined, undefined, {name: "checkbox43"}); checkbox43.text = "CV43";

var checkbox44 = panel3.add("checkbox", undefined, undefined, {name: "checkbox44"}); checkbox44.text = "CV44";

var checkbox45 = panel3.add("checkbox", undefined, undefined, {name: "checkbox45"}); checkbox45.text = "CV45";

var checkbox46 = panel3.add("checkbox", undefined, undefined, {name: "checkbox46"}); checkbox46.text = "CV46";

var checkbox47 = panel3.add("checkbox", undefined, undefined, {name: "checkbox47"}); checkbox47.text = "CV47";

var checkbox48 = panel3.add("checkbox", undefined, undefined, {name: "checkbox48"}); checkbox48.text = "CV48";

var checkbox49 = panel3.add("checkbox", undefined, undefined, {name: "checkbox49"}); checkbox49.text = "CV49";

var checkbox50 = panel3.add("checkbox", undefined, undefined, {name: "checkbox50"}); checkbox50.text = "CV50";

var checkbox51 = panel3.add("checkbox", undefined, undefined, {name: "checkbox51"}); checkbox51.text = "CV51";

var checkbox52 = panel3.add("checkbox", undefined, undefined, {name: "checkbox52"}); checkbox52.text = "CV52";

var checkbox53 = panel3.add("checkbox", undefined, undefined, {name: "checkbox53"}); checkbox53.text = "CV53";

var checkbox54 = panel3.add("checkbox", undefined, undefined, {name: "checkbox54"}); checkbox54.text = "CV54";

var checkbox55 = panel3.add("checkbox", undefined, undefined, {name: "checkbox55"}); checkbox55.text = "CV55";

var checkbox56 = panel3.add("checkbox", undefined, undefined, {name: "checkbox56"}); checkbox56.text = "CV56";

var checkbox57 = panel3.add("checkbox", undefined, undefined, {name: "checkbox57"}); checkbox57.text = "CV57";

var checkbox58 = panel3.add("checkbox", undefined, undefined, {name: "checkbox58"}); checkbox58.text = "CV58";

var checkbox59 = panel3.add("checkbox", undefined, undefined, {name: "checkbox59"}); checkbox59.text = "CV59";

var checkbox60 = panel3.add("checkbox", undefined, undefined, {name: "checkbox60"}); checkbox60.text = "CV60";

// GROUP4 // ====== var group4 = palette.add("group", undefined, {name: "group4"}); group4.orientation = "row"; group4.alignChildren = ["left","center"]; group4.spacing = 10; group4.margins = 0;

// PANEL4 // ====== var panel4 = group4.add("panel", undefined, undefined, {name: "panel4"}); panel4.text = "Column 4"; panel4.orientation = "column"; panel4.alignChildren = ["left","top"]; panel4.spacing = 10; panel4.margins = 10;

var checkbox61 = panel4.add("checkbox", undefined, undefined, {name: "checkbox61"}); checkbox61.text = "CV61";

var checkbox62 = panel4.add("checkbox", undefined, undefined, {name: "checkbox62"}); checkbox62.text = "CV62";

var checkbox63 = panel4.add("checkbox", undefined, undefined, {name: "checkbox63"}); checkbox63.text = "CV63";

var checkbox64 = panel4.add("checkbox", undefined, undefined, {name: "checkbox64"}); checkbox64.text = "CV64";

var checkbox65 = panel4.add("checkbox", undefined, undefined, {name: "checkbox65"}); checkbox65.text = "CV65";

var checkbox66 = panel4.add("checkbox", undefined, undefined, {name: "checkbox66"}); checkbox66.text = "CV66";

var checkbox67 = panel4.add("checkbox", undefined, undefined, {name: "checkbox67"}); checkbox67.text = "CV67";

var checkbox68 = panel4.add("checkbox", undefined, undefined, {name: "checkbox68"}); checkbox68.text = "CV68";

var checkbox69 = panel4.add("checkbox", undefined, undefined, {name: "checkbox69"}); checkbox69.text = "CV69";

var checkbox70 = panel4.add("checkbox", undefined, undefined, {name: "checkbox70"}); checkbox70.text = "CV70";

var checkbox71 = panel4.add("checkbox", undefined, undefined, {name: "checkbox71"}); checkbox71.text = "CV71";

var checkbox72 = panel4.add("checkbox", undefined, undefined, {name: "checkbox72"}); checkbox72.text = "CV72";

var checkbox73 = panel4.add("checkbox", undefined, undefined, {name: "checkbox73"}); checkbox73.text = "CV73";

var checkbox74 = panel4.add("checkbox", undefined, undefined, {name: "checkbox74"}); checkbox74.text = "CV74";

var checkbox75 = panel4.add("checkbox", undefined, undefined, {name: "checkbox75"}); checkbox75.text = "CV75";

var checkbox76 = panel4.add("checkbox", undefined, undefined, {name: "checkbox76"}); checkbox76.text = "CV76";

var checkbox77 = panel4.add("checkbox", undefined, undefined, {name: "checkbox77"}); checkbox77.text = "CV77";

var checkbox78 = panel4.add("checkbox", undefined, undefined, {name: "checkbox78"}); checkbox78.text = "CV78";

var checkbox79 = panel4.add("checkbox", undefined, undefined, {name: "checkbox79"}); checkbox79.text = "CV79";

var checkbox80 = panel4.add("checkbox", undefined, undefined, {name: "checkbox80"}); checkbox80.text = "CV80";

// GROUP5 // ====== var group5 = palette.add("group", undefined, {name: "group5"}); group5.orientation = "row"; group5.alignChildren = ["left","center"]; group5.spacing = 10; group5.margins = 0;

// PANEL5 // ====== var panel5 = group5.add("panel", undefined, undefined, {name: "panel5"}); panel5.text = "Column 5"; panel5.orientation = "column"; panel5.alignChildren = ["left","top"]; panel5.spacing = 10; panel5.margins = 10;

var checkbox81 = panel5.add("checkbox", undefined, undefined, {name: "checkbox81"}); checkbox81.text = "CV81";

var checkbox82 = panel5.add("checkbox", undefined, undefined, {name: "checkbox82"}); checkbox82.text = "CV82";

var checkbox83 = panel5.add("checkbox", undefined, undefined, {name: "checkbox83"}); checkbox83.text = "CV83";

var checkbox84 = panel5.add("checkbox", undefined, undefined, {name: "checkbox84"}); checkbox84.text = "CV84";

var checkbox85 = panel5.add("checkbox", undefined, undefined, {name: "checkbox85"}); checkbox85.text = "CV85";

var checkbox86 = panel5.add("checkbox", undefined, undefined, {name: "checkbox86"}); checkbox86.text = "CV86";

var checkbox87 = panel5.add("checkbox", undefined, undefined, {name: "checkbox87"}); checkbox87.text = "CV87";

var checkbox88 = panel5.add("checkbox", undefined, undefined, {name: "checkbox88"}); checkbox88.text = "CV88";

var checkbox89 = panel5.add("checkbox", undefined, undefined, {name: "checkbox89"}); checkbox89.text = "CV89";

var checkbox90 = panel5.add("checkbox", undefined, undefined, {name: "checkbox90"}); checkbox90.text = "CV90";

var checkbox91 = panel5.add("checkbox", undefined, undefined, {name: "checkbox91"}); checkbox91.text = "CV91";

var checkbox92 = panel5.add("checkbox", undefined, undefined, {name: "checkbox92"}); checkbox92.text = "CV92";

var checkbox93 = panel5.add("checkbox", undefined, undefined, {name: "checkbox93"}); checkbox93.text = "CV93";

var checkbox94 = panel5.add("checkbox", undefined, undefined, {name: "checkbox94"}); checkbox94.text = "CV94";

var checkbox95 = panel5.add("checkbox", undefined, undefined, {name: "checkbox95"}); checkbox95.text = "CV95";

var checkbox96 = panel5.add("checkbox", undefined, undefined, {name: "checkbox96"}); checkbox96.text = "CV96";

var checkbox97 = panel5.add("checkbox", undefined, undefined, {name: "checkbox97"}); checkbox97.text = "CV97";

var checkbox98 = panel5.add("checkbox", undefined, undefined, {name: "checkbox98"}); checkbox98.text = "CV98";

var checkbox99 = panel5.add("checkbox", undefined, undefined, {name: "checkbox99"}); checkbox99.text = "CV99";

checkbox1.onClick = function () { if (checkbox1.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv01", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox2.onClick = function () { if (checkbox2.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv02", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox3.onClick = function () { if (checkbox3.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv03", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox4.onClick = function () { if (checkbox4.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv04", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox5.onClick = function () { if (checkbox5.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv05", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox6.onClick = function () { if (checkbox6.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv06", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox7.onClick = function () { if (checkbox7.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv07", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox8.onClick = function () { if (checkbox8.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv08", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox9.onClick = function () { if (checkbox9.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv09", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox10.onClick = function () { if (checkbox10.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv10", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox11.onClick = function () { if (checkbox11.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv11", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox12.onClick = function () { if (checkbox12.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv12", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox13.onClick = function () { if (checkbox13.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv13", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox14.onClick = function () { if (checkbox14.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv14", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox15.onClick = function () { if (checkbox15.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv15", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox16.onClick = function () { if (checkbox16.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv16", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox17.onClick = function () { if (checkbox17.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv17", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox18.onClick = function () { if (checkbox18.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv18", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox19.onClick = function () { if (checkbox19.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv19", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox20.onClick = function () { if (checkbox20.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv20", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox21.onClick = function () { if (checkbox21.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv21", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox22.onClick = function () { if (checkbox22.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv22", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox23.onClick = function () { if (checkbox23.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv23", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox24.onClick = function () { if (checkbox24.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv24", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox25.onClick = function () { if (checkbox25.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv25", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox26.onClick = function () { if (checkbox26.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv26", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox27.onClick = function () { if (checkbox27.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv27", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox28.onClick = function () { if (checkbox28.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv28", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox29.onClick = function () { if (checkbox29.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv29", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox30.onClick = function () { if (checkbox30.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv30", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox31.onClick = function () { if (checkbox31.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv31", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox32.onClick = function () { if (checkbox32.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv32", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox33.onClick = function () { if (checkbox33.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv33", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox34.onClick = function () { if (checkbox34.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv34", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox35.onClick = function () { if (checkbox35.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv35", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox36.onClick = function () { if (checkbox36.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv36", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox37.onClick = function () { if (checkbox37.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv37", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox38.onClick = function () { if (checkbox38.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv38", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox39.onClick = function () { if (checkbox39.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv39", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox40.onClick = function () { if (checkbox40.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv40", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox41.onClick = function () { if (checkbox41.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv41", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox42.onClick = function () { if (checkbox42.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv42", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox43.onClick = function () { if (checkbox43.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv43", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox44.onClick = function () { if (checkbox44.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv44", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox45.onClick = function () { if (checkbox45.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv45", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox46.onClick = function () { if (checkbox46.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv46", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox47.onClick = function () { if (checkbox47.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv47", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox48.onClick = function () { if (checkbox48.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv48", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox49.onClick = function () { if (checkbox49.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv49", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox50.onClick = function () { if (checkbox50.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv50", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox51.onClick = function () { if (checkbox51.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv51", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox52.onClick = function () { if (checkbox52.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv52", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox53.onClick = function () { if (checkbox53.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv53", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox54.onClick = function () { if (checkbox54.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv54", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox55.onClick = function () { if (checkbox55.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv55", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox56.onClick = function () { if (checkbox56.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv56", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox57.onClick = function () { if (checkbox57.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv57", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox58.onClick = function () { if (checkbox58.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv58", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox59.onClick = function () { if (checkbox59.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv59", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox60.onClick = function () { if (checkbox60.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv60", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox61.onClick = function () { if (checkbox61.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv61", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox62.onClick = function () { if (checkbox62.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv62", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox63.onClick = function () { if (checkbox63.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv63", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox64.onClick = function () { if (checkbox64.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv64", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox65.onClick = function () { if (checkbox65.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv65", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox66.onClick = function () { if (checkbox66.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv66", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox67.onClick = function () { if (checkbox67.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv67", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox68.onClick = function () { if (checkbox68.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv68", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox69.onClick = function () { if (checkbox69.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv69", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox70.onClick = function () { if (checkbox70.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv70", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox71.onClick = function () { if (checkbox71.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv71", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox72.onClick = function () { if (checkbox72.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv72", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox73.onClick = function () { if (checkbox73.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv73", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox74.onClick = function () { if (checkbox74.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv74", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox75.onClick = function () { if (checkbox75.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv75", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox76.onClick = function () { if (checkbox76.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv76", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox77.onClick = function () { if (checkbox77.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv77", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox78.onClick = function () { if (checkbox78.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv78", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox79.onClick = function () { if (checkbox79.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv79", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox80.onClick = function () { if (checkbox80.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv80", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox81.onClick = function () { if (checkbox81.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv81", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox82.onClick = function () { if (checkbox82.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv82", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox83.onClick = function () { if (checkbox83.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv83", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox84.onClick = function () { if (checkbox84.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv84", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox85.onClick = function () { if (checkbox85.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv85", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox86.onClick = function () { if (checkbox86.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv86", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox87.onClick = function () { if (checkbox87.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv87", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox88.onClick = function () { if (checkbox88.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv88", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox89.onClick = function () { if (checkbox89.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv89", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox90.onClick = function () { if (checkbox90.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv90", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox91.onClick = function () { if (checkbox91.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv91", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox92.onClick = function () { if (checkbox92.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv92", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox93.onClick = function () { if (checkbox93.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv93", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox94.onClick = function () { if (checkbox94.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv94", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox95.onClick = function () { if (checkbox95.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv95", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

checkbox96.onClick = function () { if (checkbox96.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv96", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox97.onClick = function () { if (checkbox97.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv97", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox98.onClick = function () { if (checkbox98.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv98", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } } checkbox99.onClick = function () { if (checkbox99.value == true) { if (app.selection[0].hasOwnProperty("opentypeFeatures")) app.selection[0].opentypeFeatures = [["cv99", 1]]; } else { app.selection[0].opentypeFeatures = []; // reset to nothing } }

var convert_button1 = palette.add("button", undefined, "OK"); convert_button1.onClick = function () { palette.close(0) }

palette.show();

dhinostroza commented 2 years ago

I changed "cv83", 1 to "cv83", 2

        app.selection[0].opentypeFeatures = [["cv83", 2]];

With the prompt selected off I get: Screen Shot 2022-01-13 at 12 19 24

With the prompt selected on I get: Screen Shot 2022-01-13 at 12 19 41

It's working somewhat, as it's the expected result for cv83,1. Yet cv83,2 should look like this: q acute et

Is it a problem with the way InDesign handles character variants? Best regards, Daniel

samiartur commented 2 years ago

Hi Daniel, I don't know how You do the opentype code in your font. InDesign lets apply 2 or more Stylistic Sets in the same character but Character Variants doesn't. Regards Sami

On 13/01/2022 14:30:12, dhinostroza @.> wrote: I changed "cv83", 1 to "cv83", 2 app.selection[0].opentypeFeatures = [["cv83", 2]]; With the prompt selected off I get: [Screen Shot 2022-01-13 at 12 19 24] [https://user-images.githubusercontent.com/18691188/149378184-e61aef31-6025-48d0-9e5c-f8ba2c2e4592.png] With the prompt selected on I get: [Screen Shot 2022-01-13 at 12 19 41] [https://user-images.githubusercontent.com/18691188/149378231-886443ef-5c68-4666-be79-461a7690e7ae.png] It's working somewhat, as it's the expected result for cv83,1. Yet cv83,2 should look like this: [q acute et] [https://user-images.githubusercontent.com/18691188/149378284-f851df09-dad0-4dfd-bd96-2aaaca024540.png] Is it a problem with the way InDesign handles character variants? Best regards, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1012352832], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRV2FOAOQX2K55J4JPLUV4D2HANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.>

dhinostroza commented 2 years ago

Thank you, Sami. I'll look into Stylistic Sets now. Maybe hlig and cv83,2 can be combined as a Stylistic Set. I'm also looking at http://www.diegomaldonado.org/justincodes.html . His approach is a bit different. Best regards, Daniel

samiartur commented 2 years ago

Hi Daniel, IMHO the best way to program opentype features is using Microsoft VOLT (windows) Do You know VOLT? Regards Sami

On 13/01/2022 14:47:25, dhinostroza @.> wrote: Thank you, Sami. I'll look into Stylistic Sets now. Maybe hlig and cv83,2 can be combined as a Stylistic Set. I'm also looking at http://www.diegomaldonado.org/justincodes.html [http://www.diegomaldonado.org/justincodes.html] . His approach is a bit different. Best regards, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1012366515], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRTPSVRO6OTO54RVIALUV4F2ZANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.>

samiartur commented 2 years ago

Hi Daniel, I did a simple "CV" java scripting UI to apply the others alternates in the same "CV" As You know Junicode font has 99 cv features and some of them have more them 1 alternate. Junicode CV84 feature has 39 alternates for the same character. Please rake alook at script attached. It still a simple script. File attached. Best regards Sami

On 13/01/2022 14:47:25, dhinostroza @.> wrote: Thank you, Sami. I'll look into Stylistic Sets now. Maybe hlig and cv83,2 can be combined as a Stylistic Set. I'm also looking at http://www.diegomaldonado.org/justincodes.html [http://www.diegomaldonado.org/justincodes.html] . His approach is a bit different. Best regards, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1012366515], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRTPSVRO6OTO54RVIALUV4F2ZANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.>

dhinostroza commented 2 years ago

Hi, Sami: It seems GitHub truncated the attached file. Perhaps you can add it again or the script? All the very best, Daniel

samiartur commented 2 years ago

File attached zipped.

On 17/01/2022 13:49:24, dhinostroza @.> wrote: Hi, Sami: It seems GitHub truncated the attached file. Perhaps you can add it again or the script? All the very best, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1014729975], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRQZPJ26LBNT4IQGYD3UWRCBHANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.>

dhinostroza commented 2 years ago

Sorry, Sami: GitHub is not accepting your zip file. Screen Shot 2022-01-17 at 15 59 03 Perhaps if you add it to your code in a folder called CV Features? Best regards, Daniel

samiartur commented 2 years ago

Do You have another e-mail? My e-mail is @.***

On 17/01/2022 18:01:34, dhinostroza @.> wrote: Sorry, Sami: GitHub is not accepting your zip file. [Screen Shot 2022-01-17 at 15 59 03] [https://user-images.githubusercontent.com/18691188/149836485-2539caf4-1baa-45fb-aed9-f40787da1e31.png] Perhaps if you add it to your code in a folder called CV Features? Best regards, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1014882399], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRTBLRMNOJEJ375NHDDUWR7S5ANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.>

samiartur commented 2 years ago

The code:

// ====== var dialog = new Window("dialog");      dialog.text = "CV and alternate";      dialog.orientation = "column";      dialog.alignChildren = ["center","top"];      dialog.spacing = 10;      dialog.margins = 16; 

// GROUP1 // ====== var group1 = dialog.add("group", undefined, {name: "group1"});      group1.orientation = "column";      group1.alignChildren = ["left","center"];      group1.spacing = 0;      group1.margins = 0; 

// PANEL1 // ====== var panel1 = group1.add("panel", undefined, undefined, {name: "panel1"});      panel1.preferredSize.width = 128;      panel1.preferredSize.height = 53;      panel1.orientation = "row";      panel1.alignChildren = ["right","top"];      panel1.spacing = 10;      panel1.margins = 10; 

var statictext1 = panel1.add("statictext", undefined, undefined, {name: "statictext1"});      statictext1.text = "CV"; 

var edittext1 = panel1.add('edittext {properties: {name: "edittext1"}}');      edittext1.text = "01";      edittext1.preferredSize.width = 40; 

// PANEL2 // ====== var panel2 = group1.add("panel", undefined, undefined, {name: "panel2"});      panel2.preferredSize.width = 128;      panel2.preferredSize.height = 53;      panel2.orientation = "row";      panel2.alignChildren = ["right","top"];      panel2.spacing = 10;      panel2.margins = 10; 

var statictext2 = panel2.add("statictext", undefined, undefined, {name: "statictext2"});      statictext2.text = "alternate"; 

var edittext2 = panel2.add('edittext {properties: {name: "edittext2"}}');      edittext2.text = "1";      edittext2.preferredSize.width = 40; 

var convert_button1 = dialog.add ("button", undefined, "OK"); // var convert_button2 = dialog.add ("button", undefined, "Cancel"); convert_button1.onClick = function () { e.text = text1.text } dialog.show();

app.selection[0].opentypeFeatures=[["cv"+[edittext1.text],Number (edittext2.text)]];

On 17/01/2022 18:01:34, dhinostroza @.> wrote: Sorry, Sami: GitHub is not accepting your zip file. [Screen Shot 2022-01-17 at 15 59 03] [https://user-images.githubusercontent.com/18691188/149836485-2539caf4-1baa-45fb-aed9-f40787da1e31.png] Perhaps if you add it to your code in a folder called CV Features? Best regards, Daniel — Reply to this email directly, view it on GitHub [https://github.com/samiartur/Character-Variant-Java-Script-for-Indesign/issues/1#issuecomment-1014882399], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AD2WIRTBLRMNOJEJ375NHDDUWR7S5ANCNFSM5KTJRNKA]. Triage notifications on the go with GitHub Mobile for iOS [https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android [https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. You are receiving this because you commented.Message ID: @.>