Last active
December 5, 2020 12:10
-
-
Save jbmorizot/8f3fd9265ce245c3ef92dc855f85481d to your computer and use it in GitHub Desktop.
A basic solution to substitute a straight uppercase I by a crossbar uppercase I
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020 JEAN-BAPTISTE MORIZOT. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# PUT IN THIS GROUP ALL THE GLYPH NAME OF ALL LETTERS IN YOUR FONT (MAYBE FIGURES TOO, IN CASE YOU USE LEEETSPEAK). | |
# DON'T PUT THE GLYPH NAME OF PUNCTUATION | |
@ALL = [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z]; | |
# I ASSUME YOUR ALTERNATE I IS CALLED I.crossbar. IF NOT THE CASE, USE YOUR OWN NAMING | |
# ALWAYS SUBSTITUTE BASIC I BY CROSSBAR I EXCEPT WHEN PRECEDED OR FOLLOWED BY A LETTER (== IN A WORD) | |
# MAYBE THE CODE COULD BE ADDED IN THE LIGA FEATURE TOO. | |
feature calt { | |
ignore sub @ALL I'; | |
ignore sub I' @ALL; | |
sub I' by I.crossbar; | |
} calt; | |
# PLUS A SOLUTION TO CANCEL THE SUBSTITUTION | |
feature ss01{ | |
sub I.crossbar by I; | |
} ss01; | |
# AND A SOLUTION TO FORCE THE SUBSTITUTION | |
feature ss02{ | |
sub I by I.crossbar; | |
} ss02; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment