How do you implement ijacute and IJacute?

Dave CrosslandDave Crossland Posts: 1,074
edited December 2015 in Technique and Theory
Following up on this discussion, 




How do people set up ijacute and IJacute?

They have Unicode values, and while Underware's Latin Plus encodes them in the private use area as U+E133 which I think is not a good idea, it seems clear that either way the glyphs may need to be created and relevant OpenType 'locl' features written. 

Comments

  • Thank you John. –
    I wonder if there could be a more simple and straightforward way to implement a viable solution.

    I also wonder: you code <I acutecomb>. What if people type in <acutecomb I>?
    (I always type the accent first, and it works).

    any more insights, good practice advice?
  • Exceptions always require additional attention, but once you have a solution, you can easily copy it to your other fonts.



    script latn {
    language NLD {
    feature GlyphCompositionDecomposition1;
    }
    }

    feature GlyphCompositionDecomposition1 ccmp {
    lookup LigatureIJ;
    }

    lookup LigatureIJ {
    sub I acutecomb J acutecomb -> IJacute;
    sub I J -> IJ;
    sub i acutecomb j acutecomb -> ijacute;
    sub i j -> ij;
    sub Iacute acutecomb -> IJacute;
    sub iacute j acutecomb -> ijacute;
    }

  • @Erwin Denissen 
      sub Iacute acutecomb -> IJacute;
    should be
      sub Iacute J acutecomb -> IJacute;
    in your example.
  • Good catch! Now you mentioned it I wonder how I could have missed it.
  • John HudsonJohn Hudson Posts: 2,069
    Andreas,

    I also wonder: you code <I acutecomb>. What if people type in <acutecomb I>?
    (I always type the accent first, and it works).

    You're probably using a deadkey input mechanism that maps that series of key strokes to the precomposed í character. This is a different mechanism from using Unicode combining marks, which the standard specifies are always ordered after the base character to which they apply.

    Remember, the relationship of what you hit on a keyboard to the encoded characters stored on the computer isn't necessarily one-to-one. It's even possible to make Keyman keyboards that enable you to key Unicode combining marks before bases as if they were deadkey input, but the resulting text is stored correctly, with the marks after the bases.
  • Stephen NixonStephen Nixon Posts: 4
    edited February 19
    The code above was a bit concise (or appears to be using VOLT), but I think the following is working well for me, in standard OpenType feature format:

    feature locl {
      script latn;
        language NLD; # Dutch
          lookup LigatureIJ {
            sub I acutecomb J acutecomb by IJacute;
            sub I J by IJ;
            sub Iacute J acutecomb by IJacute;
    
            sub i acutecomb j acutecomb by ijacute;
            sub i j by ij;
            sub iacute j acutecomb by ijacute;
          } LigatureIJ;
    } locl;

    Though actually, I have several alternates for these characters for Recursive (a variable font with mono & italic alts), so I’ve extended the above with classes:

    @j_for_ij =      [j j.italic];
    @i_for_ij =      [i      i.mono      i.italic      i.simple];
    @iacute_for_ij = [iacute iacute.mono iacute.italic iacute.simple];

    And these are used for i & j in the lock feature:

    feature ccmp {
      sub IJ acutecomb by IJacute;
      sub ij acutecomb by ijacute;
    } ccmp;</code>feature locl {
      script latn;
        language NLD; # Dutch
          lookup LigatureIJ {
            sub I acutecomb J acutecomb by IJacute;
            sub I J by IJ;
            sub Iacute J acutecomb by IJacute;
    
            sub @i_for_ij acutecomb @j_for_ij acutecomb by ijacute;
            sub @i_for_ij @j_for_ij by ij;
            sub @iacute_for_ij @j_for_ij acutecomb by ijacute;
    
          } LigatureIJ;
    } locl;</span>
    </pre><div><br></div><div>And then, per John’s comment above, I’m also adding a ccmp feature:<br><br><pre class="CodeBlock"><code>



    Of course, if anyone sees any issues here, please let me know!

  • Hrant H. PapazianHrant H. Papazian Posts: 1,869
    edited February 19
    And unify that diacritic! If you really believe it's a single letter.
    https://www.flickr.com/photos/underware/15841979861/in/photolist-q95vXx-q8UhFP-q8UhGv
  • Nah, if it can have two tittles, it might as well have two acutes as well. This looks weird.
  • Hrant H. PapazianHrant H. Papazian Posts: 1,869
    edited February 19
    Maybe it shouldn't have two tittles. Try none!

    The "G" looked weird when it was invented too. Same with shoes.
Sign In or Register to comment.