Grave and acute on the different levels
Posted: Thu Nov 30, 2017 8:52 pm
Hi, everybody!
I am creating my font and would like to make combining grave and acute accent on the different levels for uppercase and lowercase letters how that is made in the known fonts like “Times New Roman.” For example, if I type some text in MS Word using “Times New Roman” and enter “Alt + 0769” after the necessary letter that it has the acute, then the acute has the different levels depending on a case of the necessary letter.
As I understand, I need to use “OpenType Layout Features” in order to do such a thing, but that is a new thing for me.
I made the following simple script (see below), but it does not work. What am I doing wrong? Could anybody help me?
script cyrl {
feature MarkPositioning2;
}
script latn {
feature MarkPositioning1;
}
class @M2B_B_1 [uni0410 uni0415 uni0418 uni041E uni0423 uni042B uni042D-uni042F uni0430 uni0435 uni0438 uni043E uni0443 uni044B uni044D-uni044F];
class @M2B_B__A [A E I O U Y a e i o u y];
feature MarkPositioning2 mark {
lookup MarkToBase1;
}
feature MarkPositioning1 mark {
lookup MarkToBase2;
}
lookup MarkToBase1 {
anchor Anchor_1;
mark gravecomb -150 740;
pos uni0410 mark 350 760;
pos uni0415 mark 350 760;
pos uni0418 mark 350 760;
pos uni041E mark 350 760;
pos uni0423 mark 350 760;
pos uni042B mark 350 760;
pos uni042D mark 350 760;
pos uni042E mark 350 760;
pos uni042F mark 350 760;
pos uni0430 mark 200 540;
pos uni0435 mark 200 540;
pos uni0438 mark 200 540;
pos uni043E mark 200 540;
pos uni0443 mark 200 540;
pos uni044B mark 200 540;
pos uni044D mark 200 540;
pos uni044E mark 200 540;
pos uni044F mark 200 540;
anchor Anchor_1;
mark acutecomb -150 740;
pos uni0410 mark 350 760;
pos uni0415 mark 350 760;
pos uni0418 mark 350 760;
pos uni041E mark 350 760;
pos uni0423 mark 350 760;
pos uni042B mark 350 760;
pos uni042D mark 350 760;
pos uni042E mark 350 760;
pos uni042F mark 350 760;
pos uni0430 mark 200 540;
pos uni0435 mark 200 540;
pos uni0438 mark 200 540;
pos uni043E mark 200 540;
pos uni0443 mark 200 540;
pos uni044B mark 200 540;
pos uni044D mark 200 540;
pos uni044E mark 200 540;
pos uni044F mark 200 540;
}
lookup MarkToBase2 {
anchor Anchor_2;
mark gravecomb -150 780;
pos A mark 350 800;
pos E mark 350 800;
pos I mark 170 800;
pos O mark 350 800;
pos U mark 350 800;
pos Y mark 350 800;
pos a mark 200 500;
pos e mark 200 500;
pos i mark 120 670;
pos o mark 200 500;
pos u mark 200 500;
pos y mark 200 500;
anchor Anchor_2;
mark acutecomb -150 780;
pos A mark 350 800;
pos E mark 350 800;
pos I mark 170 800;
pos O mark 350 800;
pos U mark 350 800;
pos Y mark 350 800;
pos a mark 200 500;
pos e mark 200 500;
pos i mark 120 670;
pos o mark 200 500;
pos u mark 200 500;
pos y mark 200 500;
}
I am creating my font and would like to make combining grave and acute accent on the different levels for uppercase and lowercase letters how that is made in the known fonts like “Times New Roman.” For example, if I type some text in MS Word using “Times New Roman” and enter “Alt + 0769” after the necessary letter that it has the acute, then the acute has the different levels depending on a case of the necessary letter.
As I understand, I need to use “OpenType Layout Features” in order to do such a thing, but that is a new thing for me.
I made the following simple script (see below), but it does not work. What am I doing wrong? Could anybody help me?
script cyrl {
feature MarkPositioning2;
}
script latn {
feature MarkPositioning1;
}
class @M2B_B_1 [uni0410 uni0415 uni0418 uni041E uni0423 uni042B uni042D-uni042F uni0430 uni0435 uni0438 uni043E uni0443 uni044B uni044D-uni044F];
class @M2B_B__A [A E I O U Y a e i o u y];
feature MarkPositioning2 mark {
lookup MarkToBase1;
}
feature MarkPositioning1 mark {
lookup MarkToBase2;
}
lookup MarkToBase1 {
anchor Anchor_1;
mark gravecomb -150 740;
pos uni0410 mark 350 760;
pos uni0415 mark 350 760;
pos uni0418 mark 350 760;
pos uni041E mark 350 760;
pos uni0423 mark 350 760;
pos uni042B mark 350 760;
pos uni042D mark 350 760;
pos uni042E mark 350 760;
pos uni042F mark 350 760;
pos uni0430 mark 200 540;
pos uni0435 mark 200 540;
pos uni0438 mark 200 540;
pos uni043E mark 200 540;
pos uni0443 mark 200 540;
pos uni044B mark 200 540;
pos uni044D mark 200 540;
pos uni044E mark 200 540;
pos uni044F mark 200 540;
anchor Anchor_1;
mark acutecomb -150 740;
pos uni0410 mark 350 760;
pos uni0415 mark 350 760;
pos uni0418 mark 350 760;
pos uni041E mark 350 760;
pos uni0423 mark 350 760;
pos uni042B mark 350 760;
pos uni042D mark 350 760;
pos uni042E mark 350 760;
pos uni042F mark 350 760;
pos uni0430 mark 200 540;
pos uni0435 mark 200 540;
pos uni0438 mark 200 540;
pos uni043E mark 200 540;
pos uni0443 mark 200 540;
pos uni044B mark 200 540;
pos uni044D mark 200 540;
pos uni044E mark 200 540;
pos uni044F mark 200 540;
}
lookup MarkToBase2 {
anchor Anchor_2;
mark gravecomb -150 780;
pos A mark 350 800;
pos E mark 350 800;
pos I mark 170 800;
pos O mark 350 800;
pos U mark 350 800;
pos Y mark 350 800;
pos a mark 200 500;
pos e mark 200 500;
pos i mark 120 670;
pos o mark 200 500;
pos u mark 200 500;
pos y mark 200 500;
anchor Anchor_2;
mark acutecomb -150 780;
pos A mark 350 800;
pos E mark 350 800;
pos I mark 170 800;
pos O mark 350 800;
pos U mark 350 800;
pos Y mark 350 800;
pos a mark 200 500;
pos e mark 200 500;
pos i mark 120 670;
pos o mark 200 500;
pos u mark 200 500;
pos y mark 200 500;
}