% \iffalse meta-comment
% 
% File: linguistix-british.dtx
% 
% ----------------------------------------------------------
% The LaTeX bundle LinguisTiX v0.6a
% 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/>.
% ----------------------------------------------------------
% 
% \fi
% \iffalse
%<*driver>
\documentclass{l3doc}
\usepackage{linguistix}
\usepackage{xcolor}
\usepackage{fontawesome5}
\usepackage[sc]{gfdl}
\usepackage{hyperxmp}
\usepackage[verbose=silent]{microtype}
\usepackage{cleveref}
\linguistix{old style one,languages={british,marathi}}

\setquotestyle{british}

\colorlet{lngxredcolor}{red!50!black}
\colorlet{lngxgreencolor}{green!50!black}
\colorlet{lngxbluecolor}{blue!50!black}

\urlstyle{tt}

\hypersetup{%
  unicode,%
  colorlinks,%
  linkcolor              = {lngxredcolor},
  citecolor              = {lngxgreencolor},
  urlcolor               = {lngxbluecolor},
  pdftitle               = {linguistix-british},%
  pdfauthor              = {निरंजन},%
  pdfsubject             = {%
    British English with LinguisTiX.%
  },%
  pdfcreator             = {निरंजन},%
  pdfkeywords            = {Linguistics, LaTeX},%
  pdfcopyright           = {%
    The LaTeX bundle linguistix\textLF
    Copyright © 2022, 2023, 2024, 2025 निरंजन\textLF
    Permission is granted to copy, distribute and/or modify
    this document under the terms of the GNU Free
    Documentation License, Version 1.3 or any later version
    published by the Free Software Foundation; with no
    Invariant Sections, no Front-Cover Texts, and no
    Back-Cover Texts. A copy of the license is included in
    the section entitled ‘GNU Free Documentation License’.%
  },%
  pdflicenseurl          = {%
    https://www.gnu.org/licenses/fdl-1.3.txt%
  }%
}%

\gfdlcopyrightholders{%
  \texorpdfstring{निरंजन (%
      \href{mailto:hi.niranjan@pm.me}{%
        \ttfamily
        hi.niranjan@pm.me%
      }%
    )%
  }{%
    निरंजन%
  }%
}

\gfdlcopyrightableyears{2022, 2023, 2024, 2025}

\gfdlcopyrightdescription{The \lngxpkg\ bundle}

\makeatletter

\setlength{\columnsep}{2pc}
\setlength{\columnseprule}{0.2pt}

\makeatother

\colorlet{lngxpurplecolor}{blue!50!red}

\def\lngxtval{%
  \begingroup
  \color{lngxredcolor}
  true%
  \endgroup
  \,|\,false%
}

\def\lngxfval{%
  true%
  \begingroup
  \color{lngxredcolor}
  \,|\,false%
  \endgroup
}

\ExplSyntaxOn
\msg_redirect_name:nnn { l3doc }
                       { foreign-internal }
                       { none }
\ExplSyntaxOff

\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
% \title{\lngxbritishlogo}
% \author{निरंजन}
% \date{^^A
%   \today\ (v0.6a)\\[1ex]^^A
%   {^^A
%     \small\faIcon{home}\quad
%     \url{^^A
%       https://ctan.org/pkg/linguistix^^A
%     }\\[0.5ex]^^A
%     \small\faIcon{git-alt}\quad
%     \url{^^A
%       https://puszcza.gnu.org.ua/projects/linguistix^^A
%     }\\[0.5ex]^^A
%     \small\faIcon[regular]{comments}\quad
%     \url{^^A
%       https://matrix.to/\#/\#linguistix:matrix.org^^A
%     }^^A
%   }^^A
% }
% 
% \maketitle
% 
%    \begin{macrocode}
%<*british>
\ProvidesExplPackage{linguistix-british}
                    {2025-12-22}
                    {v0.6a}
                    {British English}
%    \end{macrocode}
% When English language is active, it should not replace the
% set of characters that are categorised as
% \enquote{letters} by \TeX. Thus I load |letters| as an
% additional parameter to the option |onchar|.
%    \begin{macrocode}

\babelprovide [
  onchar               = { ids~ fonts~ letters }
] { british }
%    \end{macrocode}
% Here I will add the code that is executed whenever
% \cs{selectlanguage}\marg{british} is issued. The socket
% for native numbering is used here.
%    \begin{macrocode}

\addto { \extrasbritish } {
  \socket_use:n { lngx / native-numbering }
%    \end{macrocode}
% \cs{lngx_misc_reset:} is used in order to reset the
% changes made by other languages.
%    \begin{macrocode}
  \lngx_misc_reset:
}
%    \end{macrocode}
% I test if ‘british’ is the main language of the document.
% If no, then it needs to set the suitable fonts using the
% \pkg{babel}-macros that set fonts for other languages. I
% load the identical fonts that are loaded if it was the
% default language. In fact, that is why if it is the
% default language, no changes are made, because the
% necessary settings are already done by \lngxfontslogo.
%    \begin{macrocode}

\tl_if_eq:NnF \g_lngx_main_language_tl { british } {
  \lngx_other_main_font:nee { british } {
    IgnoreFontspecFile,
    \bool_if:NT \g_lngx_old_style_bool {
      Numbers              = { OldStyle },
    }
    \bool_if:NT \g_lngx_old_style_one_bool {
      CharacterVariant     = { 6 },
    }
    Renderer             = { HarfBuzz },
    UprightFont          = { NewCM10-Book.otf },
    UprightFeatures      = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCM08-Book.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCM10-Book.otf }
        }
      }
    },
    ItalicFont           = { NewCM10-BookItalic.otf },
    ItalicFeatures       = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCM08-BookItalic.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCM10-BookItalic.otf }
        }
      }
    },
    BoldFont             = { NewCM10-Bold.otf },
    BoldFeatures         = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCM10-Bold.otf }
        }
      }
    },
    BoldItalicFont       = { NewCM10-BoldItalic.otf },
    BoldItalicFeatures   = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCM10-BoldItalic.otf }
        }
      }
    },
    SlantedFont          = { NewCM10-Book.otf },
    SlantedFeatures      = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCM08-Book.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCM10-Book.otf }
        }
      }
    },
    BoldSlantedFont      = { NewCM10-Bold.otf },
    BoldSlantedFeatures  = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCM10-Bold.otf }
        }
      }
    },
    SwashFont            = { NewCM10-Book.otf },
    SwashFeatures        = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCM08-Book.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCM10-Book.otf }
        }
      }
    },
    BoldSwashFont        = { NewCM10-Bold.otf },
    BoldSwashFeatures    = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCM10-Bold.otf }
        }
      }
    }
  } { NewCM10-Book.otf }
  \lngx_other_sans_font:nee { british } {
    IgnoreFontspecFile,
    \bool_if:NT \g_lngx_old_style_bool {
      Numbers              = { OldStyle },
    }
    \bool_if:NT \g_lngx_old_style_one_bool {
      CharacterVariant     = { 6 },
    }
    Renderer             = { HarfBuzz },
    UprightFont          = { NewCMSans10-Book.otf },
    UprightFeatures      = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCMSans08-Book.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCMSans10-Book.otf }
        }
      }
    },
    ItalicFont           = { NewCMSans10-BookOblique.otf },
    ItalicFeatures       = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = {
            NewCMSans08-BookOblique.otf
          }
        },
        {
          Size                 = { 8- },
          Font                 = {
            NewCMSans10-BookOblique.otf
          }
        }
      }
    },
    BoldFont             = { NewCMSans10-Bold.otf },
    BoldFeatures         = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMSans10-Bold.otf }
        }
      }
    },
    BoldObliqueFont       = { NewCMSans10-BoldOblique.otf },
    BoldObliqueFeatures   = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = {
            NewCMSans10-BoldOblique.otf
          }
        }
      }
    },
    SlantedFont          = { NewCMSans10-Book.otf },
    SlantedFeatures      = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCMSans08-Book.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCMSans10-Book.otf }
        }
      }
    },
    BoldSlantedFont      = { NewCMSans10-Bold.otf },
    BoldSlantedFeatures  = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMSans10-Bold.otf }
        }
      }
    },
    SwashFont            = { NewCMSans10-Book.otf },
    SwashFeatures        = {
      SizeFeatures         = {
        {
          Size                 = { -8 },
          Font                 = { NewCMSans08-Book.otf }
        },
        {
          Size                 = { 8- },
          Font                 = { NewCMSans10-Book.otf }
        }
      }
    },
    BoldSwashFont        = { NewCMSans10-Bold.otf },
    BoldSwashFeatures    = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMSans10-Bold.otf }
        }
      }
    }
  } { NewCMSans10-Book.otf }
  \lngx_other_mono_font:nee { british } {
    IgnoreFontspecFile,
    Renderer             = { HarfBuzz },
    UprightFont          = { NewCMMono10-Book.otf },
    UprightFeatures      = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMMono10-Book.otf }
        }
      }
    },
    ItalicFont           = { NewCMMono10-BookItalic.otf },
    ItalicFeatures       = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = {
            NewCMMono10-BookItalic.otf
          }
        }
      }
    },
    BoldFont             = { NewCMMono10-Bold.otf },
    BoldFeatures         = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMMono10-Bold.otf }
        }
      }
    },
    BoldItalicFont       = { NewCMMono10-BoldOblique.otf },
    BoldItalicFeatures   = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = {
            NewCMMono10-BoldOblique.otf
          }
        }
      }
    },
    SlantedFont          = { NewCMMono10-Book.otf },
    SlantedFeatures      = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMMono10-Book.otf }
        }
      }
    },
    BoldSlantedFont      = { NewCMMono10-Bold.otf },
    BoldSlantedFeatures  = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMMono10-Bold.otf }
        }
      }
    },
    SwashFont            = { NewCMMono10-Book.otf },
    SwashFeatures        = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMMono10-Book.otf }
        }
      }
    },
    BoldSwashFont        = { NewCMMono10-Bold.otf },
    BoldSwashFeatures    = {
      SizeFeatures         = {
        {
          Size                 = { 0- },
          Font                 = { NewCMMono10-Bold.otf }
        }
      }
    }
  } { NewCMMono10-Book.otf }
}
%</british>
%    \end{macrocode}
% \Finale
