Difference between revisions of "Indic Scripts"
Line 72: | Line 72: | ||
The hyphenation patterns for the following languages are included in ConTeXt: | The hyphenation patterns for the following languages are included in ConTeXt: | ||
− | * Sanskrit | + | * Sanskrit <code>sa</code> |
− | * Hindi | + | * Hindi <code>hi</code> |
− | * Kannada | + | * Kannada <code>kn</code> |
− | * Telugu | + | * Telugu <code>te</code> |
− | * Tamil | + | * Tamil <code>ta</code> |
− | * Malayalam | + | * Malayalam <code>ml</code> |
− | * Bengali | + | * Bengali <code>bn</code> |
− | * Gujarati | + | * Gujarati <code>gr</code> |
+ | |||
+ | A pattern is activated with <code>\language[…]</code> |
Revision as of 10:01, 26 January 2022
TODO: this page needs to be reviewed (See: To-Do List) |
Basic Sample
A very basic sample with Indic scripts is the following:
%\definefontfamily [kannada] [rm] [Kedage] [features=kannada-one] \definefontfamily [kannada] [ss] [Tunga] [features=kannada-one] \definetypeface [kannada] [mm] [math] [modern] \setupbodyfont [kannada] \starttext ಇದು ಹೇಗಿದೆ? ನಾನು ಹೀಗೆ ತುಂಬ ಬರೆಯಬೇಕೆಂದು ಯೋಚಿಸುತ್ತಿದ್ದೇನೆ. \stoptext
Supported Scripts
The list of Indic scripts supported by ConTeXt MkIV and LMTX are:
- Devanagari
- Bengali
- Gujarati
- Gurmukhi
- Kannada
- Malayalam
- Oriya
- Tamil
- Telugu
In order to get the proper OpenType features, you need to select the proper feature from the following list:
devanagari-one
bengali-one
gujarati-one
gurmukhi-one
kannada-one
malayalam-one
oriya-one
tamil-one
telugu-one
Depending on your font, you might need instead:
devanagari-two
bengali-two
gujarati-two
gurmukhi-two
kannada-two
malayalam-two
oriya-two
tamil-two
telugu-two
Script Versions
Script tags from the OpenType specification contains second versions for what might be some (or all [I’m afraid I don’t know]) Indic scripts.
Why are those second versions available? From their own explanation:
The OpenType script tags can also correlate with a particular OpenType Layout implementation, with the result that more than one script tag may be registered for a given Unicode script (e.g. 'deva' and 'dev2').
Features ending in -one
use the older OpenType implementation, while the ones ending in -two
deploy the newer implementation.
Hyphenation
The hyphenation patterns for the following languages are included in ConTeXt:
- Sanskrit
sa
- Hindi
hi
- Kannada
kn
- Telugu
te
- Tamil
ta
- Malayalam
ml
- Bengali
bn
- Gujarati
gr
A pattern is activated with \language[…]