Can we change the input sequence ?

Discuss FontCreator here, please do not post support requests, feature requests, or bug reports!
Post Reply
raghugada
Posts: 5
Joined: Fri Mar 31, 2017 8:04 am

Can we change the input sequence ?

Post by raghugada » Mon Apr 10, 2017 9:06 am

Hi,

This is my input sequence
pmq

I want the output sequence to be
pqm

Is it possible to change the above sequence ?
If so please suggest me how to do this ?

Erwin Denissen
Moderator
Moderator
Posts: 6849
Joined: Fri Oct 04, 2002 12:41 am
Location: De Bilt, The Netherlands
Contact:

Re: Can we change the input sequence ?

Post by Erwin Denissen » Mon Apr 10, 2017 11:19 am

I'm not sure what you want to achieve.

If you want to replace a single character depending on the context, e.g. replace a character if it is preceded or followed by specific character, then use a contextual substitution.

If you want to replace multiple glyphs with multiple glyphs, then you need to know it is consider bad practice, so we strongly recommend against it. If you still want this, then you need to use a work-around, as OpenType layout features don't support multiple to multiple substitution lookups.

One way to accomplish this is to first replace several glyphs with a single (unmapped) glyph, using a ligature substitution. Then use a mulitple substitution lookup, (also known as decompose) to replace the ligature back into the final glyphs.

If you only want to make this happen if the text is preceded by a letter "p", then use the ligature within a contextual substitution.

Code: Select all

script latn {
  feature StandardLigatures1;
}

feature StandardLigatures1 liga {
  lookup ChainingContext1;
  lookup MultipleSubstitution1;
}

lookup Ligature1 {
  sub m q -> mult2multi;
}

lookup ChainingContext1 {
  context (p) m q;
  sub 0 Ligature1;
}

lookup MultipleSubstitution1 {
  sub mult2multi -> q m;
}
Erwin Denissen
High-Logic
Proven Font Technology

raghugada
Posts: 5
Joined: Fri Mar 31, 2017 8:04 am

Re: Can we change the input sequence ?

Post by raghugada » Mon Apr 10, 2017 3:06 pm

Hi,

Actually i want to change the position of characters in the output.
I don't want to substitute

Erwin Denissen
Moderator
Moderator
Posts: 6849
Joined: Fri Oct 04, 2002 12:41 am
Location: De Bilt, The Netherlands
Contact:

Re: Can we change the input sequence ?

Post by Erwin Denissen » Mon Apr 10, 2017 3:20 pm

raghugada wrote:Hi,

Actually i want to change the position of characters in the output.
I don't want to substitute
That is related to word processing, not to fonts. If you want that, type the characters in the different order or use search-replace in your word processing software.
Erwin Denissen
High-Logic
Proven Font Technology

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests