%%
%% This is file `linguistix-ipa.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% linguistix.dtx  (with options: `ipa')
%% ---------------------------------------------------------
%% Package:      linguistix
%% Version:      v0.1b
%% Author:       निरंजन
%% Description:  Enhanced support for linguistics.
%% Repository:   puszcza.gnu.org.ua/projects/linguistix
%% License:      GPLv3+, GFDLv1.3+
%% ---------------------------------------------------------
%% 
%% The linguistix bundle v0.1b
%% Copyright © 2022, 2023, 2024, 2025 निरंजन
%% 
%% This program is free software: you can redistribute it
%% and/or modify it under the terms of the GNU General
%% Public License as published by the Free Software
%% Foundation, either version 3 of the License, or (at your
%% option) any later version.
%% 
%% This program is distributed in the hope that it will be
%% useful, but WITHOUT ANY WARRANTY; without even the
%% implied warranty of MERCHANTABILITY or FITNESS FOR A
%% PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%% 
%% You should have received a copy of the GNU General Public
%% License along with this program. If not, see
%% <https://www.gnu.org/licenses/>.
%% 
%% ---------------------------------------------------------
\ProvidesExplPackage{linguistix-ipa}
                    {2025-05-20}
                    {v0.1b}
                    {%
                      A package for typesetting the IPA
                      (International Phonetic Alphabet) from
                      the ‘LinguisTiX’ bundle.%
                    }

\IfPackageLoadedF { unicode-math } {
  \RequirePackage { unicode-math }
}

\IfPackageLoadedF { linguistix-base } {
  \RequirePackage { linguistix-base }
}

\IfPackageLoadedF { linguistix-nfss } {
  \RequirePackage { linguistix-nfss }
}

\NewDocumentCommand \ipatext { s m } {
  \IfBooleanTF { #1 } {
    {
      \lngxipa
      / #2 /
    }
  } {
    {
      \lngxipa
      [ #2 ]
    }
  }
}

\clist_map_inline:nn {
  upright,
  bold~ upright,
  italic,
  bold~ italic,
  slanted,
  bold~ slanted,
  swash,
  bold~ swash,
  small~ caps
} {
  \tl_set:Nn \l_tmpa_tl { #1 }
  \tl_replace_all:Nnn \l_tmpa_tl { ~ } { _ }
  \tl_gclear_new:c {
    g _ lngx _ ipa _ \l_tmpa_tl _ features _ tl
  }
  \keys_define:nn { lngx _ keys } {
    ipa~ #1
    .tl_gset_e:c           = {
      g _ lngx _ ipa _ \l_tmpa_tl _ tl
    },
    ipa~ #1~ features
    .code:n                = {
      \tl_set:Nn \l_tmpb_tl { #1 }
      \tl_replace_all:Nnn \l_tmpb_tl { ~ } { _ }
      \tl_put_right:ce {
        g _ lngx _ ipa _ \l_tmpb_tl _ features _ tl
      } { ##1 , }
      \tl_clear:N \l_tmpb_tl
    }
  }
  \tl_clear:N \l_tmpa_tl
}

\clist_map_inline:nn {
  upright,
  bold~ upright,
  italic,
  bold~ italic,
  slanted,
  bold~ slanted,
  swash,
  bold~ swash,
  small~ caps
} {
  \tl_set:Nn \l_tmpa_tl { #1 }
  \tl_replace_all:Nnn \l_tmpa_tl { ~ } { _ }
  \tl_gclear_new:c {
    g _ lngx _ ipa _ mono _ \l_tmpa_tl _ features _ tl
  }
  \keys_define:nn { lngx _ keys } {
    ipa~ mono~ #1
    .tl_gset_e:c           = {
      g _ lngx _ ipa _ mono _ \l_tmpa_tl _ tl
    },
    ipa~ mono~ #1~ features
    .code:n                = {
      \tl_set:Nn \l_tmpb_tl { #1 }
      \tl_replace_all:Nnn \l_tmpb_tl { ~ } { _ }
      \tl_put_right:ce {
        g _ lngx _ ipa _ mono _ \l_tmpb_tl _ features _ tl
      } { ##1 , }
      \tl_clear:N \l_tmpb_tl
    }
  }
  \tl_clear:N \l_tmpa_tl
}

\clist_map_inline:nn {
  upright,
  bold~ upright,
  italic,
  bold~ italic,
  slanted,
  bold~ slanted,
  swash,
  bold~ swash,
  small~ caps
} {
  \tl_set:Nn \l_tmpa_tl { #1 }
  \tl_replace_all:Nnn \l_tmpa_tl { ~ } { _ }
  \tl_gclear_new:c {
    g _ lngx _ ipa _ sans _ \l_tmpa_tl _ features _ tl
  }
  \keys_define:nn { lngx _ keys } {
    ipa~ sans~ #1
    .tl_gset_e:c           = {
      g _ lngx _ ipa _ sans _ \l_tmpa_tl _ tl
    },
    ipa~ sans~ #1~ features
    .code:n                = {
      \tl_set:Nn \l_tmpb_tl { #1 }
      \tl_replace_all:Nnn \l_tmpb_tl { ~ } { _ }
      \tl_put_right:ce {
        g _ lngx _ ipa _ sans _ \l_tmpb_tl _ features _ tl
      } { ##1 , }
      \tl_clear:N \l_tmpb_tl
    }
  }
  \tl_clear:N \l_tmpa_tl
}

\keys_define:nn { lngx _ keys } {
  ipa~ newcm
  .meta:n                = {
    ipa~
    upright                = {
      NewCM10-Book.otf
    },
    ipa~
    bold~ upright          = {
      NewCM10-Bold.otf
    },
    ipa~
    italic                 = {
      NewCM10-BookItalic.otf
    },
    ipa~
    bold~ italic           = {
      NewCM10-BoldItalic.otf
    },
    ipa~
    slanted                = {
      NewCM10-Book.otf
    },
    ipa~
    bold~ slanted          = {
      NewCM10-Bold.otf
    },
    ipa~
    swash                  = {
      NewCM10-Book.otf
    },
    ipa~
    bold~ swash            = {
      NewCM10-Bold.otf
    },
    ipa~
    small~ caps            = {
      NewCM10-Book.otf
    },
    ipa~
    sans~ upright          = {
      NewCMSans10-Book.otf
    },
    ipa~
    sans~ bold~ upright    = {
      NewCMSans10-Bold.otf
    },
    ipa~
    sans~ italic           = {
      NewCMSans10-BookOblique.otf
    },
    ipa~
    sans~ bold~ italic     = {
      NewCMSans10-BoldOblique.otf
    },
    ipa~
    sans~ slanted          = {
      NewCMSans10-BookOblique.otf
    },
    ipa~
    sans~ bold~ slanted    = {
      NewCMSans10-BoldOblique.otf
    },
    ipa~
    sans~ swash            = {
      NewCMSans10-Book.otf
    },
    ipa~
    sans~ bold~ swash      = {
      NewCMSans10-Bold.otf
    },
    ipa~
    sans~ small~ caps      = {
      NewCMSans10-Book.otf
    },
    ipa~
    mono~ upright          = {
      NewCMMono10-Book.otf
    },
    ipa~
    mono~ bold~ upright    = {
      NewCMMono10-Bold.otf
    },
    ipa~
    mono~ italic           = {
      NewCMMono10-BookItalic.otf
    },
    ipa~
    mono~ bold~ italic     = {
      NewCMMono10-BoldOblique.otf
    },
    ipa~
    mono~ slanted          = {
      NewCMMono10-Book.otf
    },
    ipa~
    mono~ bold~ slanted    = {
      NewCMMono10-BoldOblique.otf
    },
    ipa~
    mono~ swash            = {
      NewCMMono10-Book.otf
    },
    ipa~
    mono~ bold~ swash      = {
      NewCMMono10-Bold.otf
    },
    ipa~
    mono~ small~ caps      = {
      NewCMMono10-Book.otf
    }
  }
}

\keys_define:nn { lngx _ keys } {
  ipa~ newcm~ sans
  .meta:n                = {
    ipa~
    upright                = {
      NewCMSans10-Book.otf
    },
    ipa~
    bold~ upright          = {
      NewCMSans10-Bold.otf
    },
    ipa~
    italic                 = {
      NewCMSans10-BookOblique.otf
    },
    ipa~
    bold~ italic           = {
      NewCMSans10-BoldOblique.otf
    },
    ipa~
    slanted                = {
      NewCMSans10-BookOblique.otf
    },
    ipa~
    bold~ slanted          = {
      NewCMSans10-BoldOblique.otf
    },
    ipa~
    swash                  = {
      NewCMSans10-Book.otf
    },
    ipa~
    bold~ swash            = {
      NewCMSans10-Bold.otf
    },
    ipa~
    small~ caps            = {
      NewCMSans10-Book.otf
    }
  }
}

\keys_define:nn { lngx _ keys } {
  ipa~ newcm~ mono
  .meta:n                = {
    ipa~
    upright                = {
      NewCMMono10-Book.otf
    },
    ipa~
    bold~ upright          = {
      NewCMMono10-Bold.otf
    },
    ipa~
    italic                 = {
      NewCMMono10-BookItalic.otf
    },
    ipa~
    bold~ italic           = {
      NewCMMono10-BoldOblique.otf
    },
    ipa~
    slanted                = {
      NewCMMono10-Book.otf
    },
    ipa~
    bold~ slanted          = {
      NewCMMono10-BoldOblique.otf
    },
    ipa~
    swash                  = {
      NewCMMono10-Book.otf
    },
    ipa~
    bold~ swash            = {
      NewCMMono10-Bold.otf
    },
    ipa~
    small~ caps            = {
      NewCMMono10-Book.otf
    }
  }
}

\keys_define:nn { lngx _ keys } {
  ipa~ newcm~ regular
  .meta:n                = {
    ipa~
    upright                = {
      NewCM10-Regular.otf
    },
    ipa~
    bold~ upright          = {
      NewCM10-Bold.otf
    },
    ipa~
    italic                 = {
      NewCM10-Italic.otf
    },
    ipa~
    bold~ italic           = {
      NewCM10-BoldItalic.otf
    },
    ipa~
    slanted                = {
      NewCM10-Regular.otf
    },
    ipa~
    bold~ slanted          = {
      NewCM10-Bold.otf
    },
    ipa~
    swash                  = {
      NewCM10-Regular.otf
    },
    ipa~
    bold~ swash            = {
      NewCM10-Bold.otf
    },
    ipa~
    small~ caps            = {
      NewCM10-Regular.otf
    },
    ipa~
    sans~ upright          = {
      NewCMSans10-Regular.otf
    },
    ipa~
    sans~ bold             = {
      NewCMSans10-Bold.otf
    },
    ipa~
    sans~ italic           = {
      NewCMSans10-Oblique.otf
    },
    ipa~
    sans~ bold~ italic     = {
      NewCMSans10-BoldOblique.otf
    },
    ipa~
    sans~ slanted          = {
      NewCMSans10-Regular.otf
    },
    ipa~
    sans~ bold~ slanted    = {
      NewCMSans10-Bold.otf
    },
    ipa~
    sans~ swash            = {
      NewCMSans10-Regular.otf
    },
    ipa~
    sans~ bold~ swash      = {
      NewCMSans10-Bold.otf
    },
    ipa~
    sans~ small~ caps      = {
      NewCMSans10-Regular.otf
    },
    ipa~
    mono~ upright          = {
      NewCMMono10-Regular.otf
    },
    ipa~
    mono~ bold             = {
      NewCMMono10-Bold.otf
    },
    ipa~
    mono~ italic           = {
      NewCMMono10-Italic.otf
    },
    ipa~
    mono~ bold~ italic     = {
      NewCMMono10-Bold.otf
    },
    ipa~
    mono~ slanted          = {
      NewCMMono10-Regular.otf
    },
    ipa~
    mono~ bold~ slanted    = {
      NewCMMono10-Bold.otf
    },
    ipa~
    mono~ swash            = {
      NewCMMono10-Regular.otf
    },
    ipa~
    mono~ bold~ swash      = {
      NewCMMono10-Bold.otf
    },
    ipa~
    mono~ small~ caps      = {
      NewCMMono10-Regular.otf
    }
  }
}

\keys_define:nn { lngx _ keys } {
  ipa~ newcm~ sans~ regular
  .meta:n                = {
    ipa~
    upright                = {
      NewCMSans10-Regular.otf
    },
    ipa~
    bold                   = {
      NewCMSans10-Bold.otf
    },
    ipa~
    italic                 = {
      NewCMSans10-Oblique.otf
    },
    ipa~
    bold~ italic           = {
      NewCMSans10-BoldOblique.otf
    },
    ipa~
    slanted                = {
      NewCMSans10-Regular.otf
    },
    ipa~
    bold~ slanted          = {
      NewCMSans10-Bold.otf
    },
    ipa~
    swash                  = {
      NewCMSans10-Regular.otf
    },
    ipa~
    bold~ swash            = {
      NewCMSans10-Bold.otf
    },
    ipa~
    small~ caps            = {
      NewCMSans10-Regular.otf
    }
  }
}

\keys_define:nn { lngx _ keys } {
  ipa~ newcm~ mono~ regular
  .meta:n                = {
    ipa~
    upright                = {
      NewCMMono10-Regular.otf
    },
    ipa~
    bold                   = {
      NewCMMono10-Bold.otf
    },
    ipa~
    italic                 = {
      NewCMMono10-Italic.otf
    },
    ipa~
    bold~ italic           = {
      NewCMMono10-Bold.otf
    },
    ipa~
    slanted                = {
      NewCMMono10-Regular.otf
    },
    ipa~
    bold~ slanted          = {
      NewCMMono10-Bold.otf
    },
    ipa~
    swash                  = {
      NewCMMono10-Regular.otf
    },
    ipa~
    bold~ swash            = {
      NewCMMono10-Bold.otf
    },
    ipa~
    small~ caps            = {
      NewCMMono10-Regular.otf
    }
  }
}

\lngx_set_keys:n {ipa~ newcm}

\sys_if_engine_luatex:T {
  \lngx_set_keys:n {
    ipa~
    upright~ features      = {
      Renderer               = { HarfBuzz }
    },
    ipa~ sans~
    upright~ features      = {
      Renderer               = { HarfBuzz }
    },
    ipa~ mono~
    upright~ features      = {
      Renderer               = { HarfBuzz }
    }
  }
}

\cs_new_protected:Npn \lngx_set_main_ipa_font:nn #1#2 {
  \setfontfamily \lngx_main_ipa: [
    #1,
    NFSSFamily             = { lngx _ ipa _ rm _nfss }
  ] { #2 }
}

\cs_new_protected:Npn \lngx_set_sans_ipa_font:nn #1#2 {
  \setfontfamily \lngx_sans_ipa: [
    #1,
    NFSSFamily             = { lngx _ ipa _ sf _nfss }
  ] { #2 }
}

\cs_new_protected:Npn \lngx_set_mono_ipa_font:nn #1#2 {
  \setfontfamily \lngx_mono_ipa: [
    #1,
    NFSSFamily             = { lngx _ ipa _ tt _nfss }
  ] { #2 }
}

\cs_generate_variant:Nn \lngx_set_main_ipa_font:nn { ee }
\cs_generate_variant:Nn \lngx_set_sans_ipa_font:nn { ee }
\cs_generate_variant:Nn \lngx_set_mono_ipa_font:nn { ee }

\lngx_super_font_family:nn { lngx _ ipa } {
  rm                     = { lngx _ ipa _ rm _ nfss },
  sf                     = { lngx _ ipa _ sf _ nfss },
  tt                     = { lngx _ ipa _ tt _ nfss }
}

\cs_new_protected:Npn \lngx_ipa: {
  \lngx_softer_super_font_family:n { lngx _ ipa }
}

\cs_set_eq:NN \lngxipa \lngx_ipa:

\hook_gput_code:nnn { begindocument / before } { . } {
  \tl_if_in:cnT {
    g _ lngx _ ipa _ upright _ tl
  } { NewCM } {
    \tl_if_in:cnTF {
      g _ lngx _ ipa _ upright _ tl
    } { Book } {
      \lngx_set_keys:n {
        ipa~
        upright~ features      = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCM08-Book.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCM10-Book.otf
              }
            }
          }
        }
      }
    } {
      \lngx_set_keys:n {
        ipa~
        upright~ features      = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCM08-Regular.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCM10-Regular.otf
              }
            }
          }
        }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ upright _ tl
  } { NewCMSans } {
    \tl_if_in:cnTF {
      g _ lngx _ ipa _ upright _ tl
    } { Book } {
      \lngx_set_keys:n {
        ipa~
        upright~ features      = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-Book.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-Book.otf
              }
            }
          }
        }
      }
    } {
      \lngx_set_keys:n {
        ipa~
        upright~ features      = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-Regular.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-Regular.otf
              }
            }
          }
        }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ italic _ tl
  } { NewCM } {
    \tl_if_in:cnTF {
      g _ lngx _ ipa _ italic _ tl
    } { Book } {
      \lngx_set_keys:n {
        ipa~
        italic~ features       = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCM08-BookItalic.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCM10-BookItalic.otf
              }
            }
          }
        }
      }
    } {
      \lngx_set_keys:n {
        ipa~
        italic~ features       = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCM08-Italic.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCM08-Italic.otf
              }
            }
          }
        }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ italic _ tl
  } { NewCMSans } {
    \tl_if_in:cnTF {
      g _ lngx _ ipa _ italic _ tl
    } { Book } {
      \lngx_set_keys:n {
        ipa~
        italic~ features       = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-BookOblique.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-BookOblique.otf
              }
            }
          }
        }
      }
    } {
      \lngx_set_keys:n {
        ipa~
        italic~ features       = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-Oblique.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans08-Oblique.otf
              }
            }
          }
        }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ sans _ upright _ tl
  } { NewCMSans } {
    \tl_if_in:cnTF {
      g _ lngx _ ipa _ upright _ tl
    } { Book } {
      \lngx_set_keys:n {
        ipa~ sans~
        upright~ features      = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-Book.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-Book.otf
              }
            }
          }
        }
      }
    } {
      \lngx_set_keys:n {
        ipa~ sans~
        upright~ features      = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-Regular.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-Regular.otf
              }
            }
          }
        }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ sans _ italic _ tl
  } { NewCMSans } {
    \tl_if_in:cnTF {
      g _ lngx _ ipa _ italic _ tl
    } { Book } {
      \lngx_set_keys:n {
        ipa~ sans~
        italic~ features       = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-BookOblique.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-BookOblique.otf
              }
            }
          }
        }
      }
    } {
      \lngx_set_keys:n {
        ipa~ sans~
        italic~ features       = {
          SizeFeatures           = {
            {
              Size                   = {-8},
              Font                   = {
                NewCMSans08-Oblique.otf
              }
            },
            {
              Size                   = {8-},
              Font                   = {
                NewCMSans10-Oblique.otf
              }
            }
          }
        }
      }
    }
  }
  \lngx_set_keys:n {
    ipa~ upright~ features   = {
      UprightFont            = {
        \g_lngx_ipa_upright_tl
      },
      UprightFeatures        = {
        \g_lngx_ipa_upright_features_tl
      },
      BoldFont                 = {
        \g_lngx_ipa_bold_upright_tl
      },
      BoldFeatures             = {
        \g_lngx_ipa_bold_upright_features_tl
      },
      ItalicFont               = {
        \g_lngx_ipa_italic_tl
      },
      ItalicFeatures           = {
        \g_lngx_ipa_italic_features_tl
      },
      BoldItalicFont           = {
        \g_lngx_ipa_bold_italic_tl
      },
      BoldItalicFeatures       = {
        \g_lngx_ipa_bold_italic_features_tl
      },
      \tl_if_empty:cF {
        g _ lngx _ ipa _ slanted _ tl
      } {
        SlantedFont              = {
          \g_lngx_ipa_slanted_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ slanted _ features _ tl
        } {
          SlantedFeatures          = {
            \g_lngx_ipa_slanted_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ bold _ slanted _ tl
      } {
        BoldSlantedFont          = {
          \g_lngx_ipa_bold_slanted_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ bold _ slanted _ features _ tl
        } {
          BoldSlantedFeatures      = {
            \g_lngx_ipa_bold_slanted_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ swash _ tl
      } {
        SwashFont                = {
          \g_lngx_ipa_swash_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ swash _ features _ tl
        } {
          SwashFeatures            = {
            \g_lngx_ipa_swash_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ bold _ swash _ tl
      } {
        BoldSwashFont            = {
          \g_lngx_ipa_bold_swash_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ bold _ swash _ features _ tl
        } {
          BoldSwashFeatures        = {
            \g_lngx_ipa_bold_swash_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ small _ caps _ tl
      } {
        SmallCapsFont            = {
          \g_lngx_ipa_small_caps_tl
        }
        \tl_if_empty:cF {
          g _ lngx _ ipa _ small _ caps _ features _ tl
        } {
          SmallCapsFeatures        = {
            \g_lngx_ipa_small_caps_features_tl
          }
        }
      }
    },
    ipa~
    sans~ upright~ features  = {
      UprightFont              = {
        \g_lngx_ipa_sans_upright_tl
      },
      UprightFeatures          = {
        \g_lngx_ipa_sans_upright_features_tl
      },
      BoldFont                 = {
        \g_lngx_ipa_sans_bold_upright_tl
      },
      BoldFeatures             = {
        \g_lngx_ipa_sans_bold_upright_features_tl
      },
      ItalicFont               = {
        \g_lngx_ipa_sans_italic_tl
      },
      ItalicFeatures           = {
        \g_lngx_ipa_sans_italic_features_tl
      },
      BoldItalicFont           = {
        \g_lngx_ipa_sans_bold_italic_tl
      },
      BoldItalicFeatures       = {
        \g_lngx_ipa_sans_bold_italic_features_tl
      },
      \tl_if_empty:cF {
        g _ lngx _ ipa _ slanted _ tl
      } {
        SlantedFont              = {
          \g_lngx_ipa_slanted_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ slanted _ features _ tl
        } {
          SlantedFeatures          = {
            \g_lngx_ipa_slanted_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ sans _ bold _ slanted _ tl
      } {
        BoldSlantedFont          = {
          \g_lngx_ipa_sans_bold_slanted_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ sans _ bold _ slanted _ features
          _ tl
        } {
          BoldSlantedFeatures      = {
            \g_lngx_ipa_sans_bold_slanted_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ sans_ swash _ tl
      } {
        SwashFont                = {
          \g_lngx_ipa_sans_swash_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ sans_ swash _ features _ tl
        } {
          SwashFeatures            = {
            \g_lngx_ipa_sans_swash_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ sans _ bold _ swash _ tl
      } {
        BoldSwashFont            = {
          \g_lngx_ipa_sans_bold_swash_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ sans _ bold _ swash _ features _
          tl
        } {
          BoldSwashFeatures        = {
            \g_lngx_ipa_sans_bold_swash_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ sans _ small _ caps _ tl
      } {
        SmallCapsFont            = {
          \g_lngx_ipa_sans_small_caps_tl
        }
        \tl_if_empty:cF {
          g _ lngx _ ipa _ sans _ small _ caps _ features _
          tl
        } {
          SmallCapsFeatures        = {
            \g_lngx_ipa_sans_small_caps_features_tl
          }
        }
      }
    },
    ipa~
    mono~ upright~ features  = {
      UprightFont              = {
        \g_lngx_ipa_mono_bold_upright_tl
      },
      UprightFeatures          = {
        \g_lngx_ipa_mono_bold_upright_features_tl
      },
      BoldFont                 = {
        \g_lngx_ipa_mono_bold_upright_tl
      },
      BoldFeatures             = {
        \g_lngx_ipa_mono_bold_upright_features_tl
      },
      ItalicFont               = {
        \g_lngx_ipa_mono_italic_tl
      },
      ItalicFeatures           = {
        \g_lngx_ipa_mono_italic_features_tl
      },
      BoldItalicFont           = {
        \g_lngx_ipa_mono_bold_italic_tl
      },
      BoldItalicFeatures       = {
        \g_lngx_ipa_mono_bold_italic_features_tl
      },
      \tl_if_empty:cF {
        g _ lngx _ ipa _ mono _ slanted _ tl
      } {
        SlantedFont              = {
          \g_lngx_ipa_mono_slanted_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ mono _ slanted _ features _ tl
        } {
          SlantedFeatures          = {
            \g_lngx_ipa_mono_slanted_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ mono _ bold _ slanted _ tl
      } {
        BoldSlantedFont          = {
          \g_lngx_ipa_mono_bold_slanted_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ mono _ bold _ slanted _ features
          _ tl
        } {
          BoldSlantedFeatures    = {
            \g_lngx_ipa_mono_bold_slanted_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ mono _ swash _ tl
      } {
        SwashFont                = {
          \g_lngx_ipa_mono_swash_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ mono _ swash _ features _ tl
        } {
          SwashFeatures            = {
            \g_lngx_ipa_mono_swash_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ mono _ bold _ swash _ tl
      } {
        BoldSwashFont            = {
          \g_lngx_ipa_mono_bold_swash_tl
        },
        \tl_if_empty:cF {
          g _ lngx _ ipa _ mono _ bold _ swash _ features _
          tl
        } {
          BoldSwashFeatures        = {
            \g_lngx_ipa_mono_bold_swash_features_tl
          },
        }
      }
      \tl_if_empty:cF {
        g _ lngx _ ipa _ mono _ small _ caps _ tl
      } {
        SmallCapsFont            = {
          \g_lngx_ipa_mono_small_caps_tl
        }
        \tl_if_empty:cF {
          g _ lngx _ ipa _ mono _ small _ caps _ features _
          tl
        } {
          SmallCapsFeatures        = {
            \g_lngx_ipa_mono_small_caps_features_tl
          }
        }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ upright _ tl
  } { NewCM } {
    \lngx_set_keys:n {
      ipa~
      upright~ features        = {
        IgnoreFontspecFile,
        StylisticSet             = { 5 }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ sans _ upright _ tl
  } { NewCM } {
    \lngx_set_keys:n {
      ipa~ sans~
      upright~ features        = {
        IgnoreFontspecFile,
        StylisticSet             = { 5 }
      }
    }
  }
  \tl_if_in:cnT {
    g _ lngx _ ipa _ mono _ upright _ tl
  } { NewCM } {
    \lngx_set_keys:n {
      ipa~ mono~
      upright~ features        = {
        IgnoreFontspecFile,
        StylisticSet             = { 5 }
      }
    }
  }
  \lngx_set_main_ipa_font:ee {
    \g_lngx_ipa_upright_features_tl
  } {
    \g_lngx_ipa_upright_tl
  }
  \lngx_set_sans_ipa_font:ee {
    \g_lngx_ipa_sans_upright_features_tl
  } {
    \g_lngx_ipa_sans_upright_tl
  }
  \lngx_set_mono_ipa_font:ee {
    \g_lngx_ipa_mono_upright_features_tl
  } {
    \g_lngx_ipa_mono_upright_tl
  }
}
\endinput
%%
%% End of file `linguistix-ipa.sty'.
