Changes

Jump to navigation Jump to search
no edit summary
A '''Unicode block''' is an interval of code points which represent characters that are semantically related to each other. For example, there is a Unicode block for characters from the Devanagari script which is used by several Indian languages. Another Unicode block corresponds to characters which denote mathematical operators, such as those that indicate the union and the intersection of sets.
ConTeXt has special names for all Unicode blocks. These names can be used to specify ranges of code points in the setups of several commands.
== Unicode blocks ==
A '''Unicode block''' is an organisational unit of the Unicode code space. The Unicode code space is the set of all code points, that is, the set of all integers from 0 to the integer whose hexadecimal representation is 10FFF. The official list of the blocks is available [ftp://www.unicode.org/Public/UNIDATA/Blocks.txt at the Unicode Web site].
Every block is an interval of code points. Different blocks are disjoint from each other, and every code point belongs to at least one block. Thus, the blocks form a partition of the set of all Unicode code points. The number of code points in a block varies. Some have just 16 code points, and some others have thousands of code points.
See the article [[List of Unicode blocks]] for a table of Unicode blocks, their ConTeXt names, and links to more information about them.
== Usage An example usage of the Unicode blocks in ConTeXt ==
A typical use of Unicode blocks is in the definition of '''fallback''' fonts to provide glyphs for certain characters. Sometimes, when writing a document in ConTeXt, one needs to typeset special symbols that are not available in the base font of the document. In such a situation, one can specify a fallback font to provide these missing symbols.
</context>
== Another use of fallback fonts arises when one wants to replace the glyphs for some characters in the base font with glyphs for those characters from another font. In such a case, the latter font can be specified as a fallback font.example ==
A different application of fallback fonts arises when one wants to replace the existing glyphs for some characters in the base font with glyphs for those characters from another font. This situation is different from the one in the previous example. There, the base font did not contain glyphs for the characters of interest, and the fallback font provided the missing glyphs. Here, the base font does contain glyphs for the characters in question, but, perhaps due to aesthetic reaosons, the author of the document, wants to replace those glyphs with glyphs from another font. In such a case, the latter font can be specified as a fallback font. For example, the following document uses the [[Latin ModernTeX Gyre|{{code|pagella}}]] font as typescript to provide the base font, and uses the {{code|Asana MathSTIX General Regular}} font for mathematical script letters, which lie in the Unicode block {{code|Mathematical Alphanumeric Symbols}}. Instead of {{cmd|definefallbackfamily}} which was used in the previous example, this document uses the command {{cmd|definefontfallback}}. The ConTeXt name of the block is supplied as the last third setup of this command. The last setup {{code|1=force=yes}} ensures that the glyphs of the relevant characters are replaced from the fallback font, overriding the glyphs that may exist in the base font for these characters.
<texcode>
<pre>
system > 313: filename=/usr/share/fonts/opentype/stix/STIXGeneral-Regular.otf ...
</pre>
so {{code|context}} is taking the missing glyphs from the STIX fonts provided by the local operating system.
51

edits

Navigation menu