Changes

Jump to navigation Jump to search
no edit summary
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.
 
This article uses some basic terminology from the Unicode Standard<ref name="Unicode">The Unicode Consortium, ''The Unicode Standard'', Version 10.0.0, The Unicode Consortium, Mountain View, CA, USA, 2016, http://www.unicode.org/versions/Unicode10.0.0/, Retrieved 2017-11-03.</ref>. For brief descriptions of these terms, see the Unicode glossary<ref name="Unicode-glossary">The Unicode Consortium, ''Glossary'', http://www.unicode.org/glossary/, Retrieved 2017-11-03.</ref>.
== Unicode blocks ==
A Unicode block, or, simply, a block, is any of the subsets of the Unicode code space that are listed in the file {{code|Blocks.txt}}<ref name="Blocks">The Unicode Consortium, ''Blocks.txt'', ftp://www.unicode.org/Public/UNIDATA/Blocks.txt, Retrieved 2017-11-03.</ref> of the Unicode Character Database. 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 main properties of blocks are described in the Unicode Standard<ref name="Unicode"/> (Section 3.4, paragraph D10b). Every block is an interval of code points, and distinct blocks are disjoint from each other. In particular, the blocks form a partition of a subset of the Unicode code space.
A block starts at a code point that is a multiple of 16. The number of code points in each block is also a multiple of 16. Thus, the hexadecimal representation of the first code point in a block is of the form ''pqrs''0, and that of the last code point in it is of the form ''tuvw''F, where ''p'', ''q'', ''r'', ''s'', ''t'', ''u'', ''v'', and ''w'', are hexadecimal digits.
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.
For example, in the following document, containing verses from the Wikipedia article on ''Jabberwocky''<ref>Wikipedia contributors, ''Jabberwocky'', Wikipedia: The Free Encyclopaedia, 2017-11-03, 07:58 UTC, https://en.wikipedia.org/w/index.php?title=Jabberwocky&oldid=808507152, Retrieved 2017-11-03.</ref>, the base font [[TeX Gyre|TeX Gyre Pagella]] does not have the glyphs for Cyrillic characters, whose code points are in the Unicode block {{code|Cyrillic}}. The document uses the {{cmd|definefallbackfamily}} command to get the glyphs for this block from the {{code|DejaVu Serif}} font. The ConTeXt name of the block is supplied as the value of the key {{code|range}} in the last setup of the command.
<context source=yes text="Here is an image showing the relevant part of the PDF file obtained by running context on a file containing this document:">
so {{code|context}} is indeed, and as expected, taking some of the glyphs from the fallback font, which, in this case, is provided by the local operating system.
 
== Notes ==
 
This article uses some basic terms, such as ''character'', ''code point'', and ''assigned code point'', from the Unicode Standard<ref name="Unicode">The Unicode Consortium, ''The Unicode Standard'', Version 10.0.0, The Unicode Consortium, Mountain View, CA, USA, 2016, http://www.unicode.org/versions/Unicode10.0.0/, Retrieved 2017-11-03.</ref>. For brief descriptions of these terms, see the Unicode glossary<ref name="Unicode-glossary">The Unicode Consortium, ''Glossary'', http://www.unicode.org/glossary/, Retrieved 2017-11-03.</ref>.
 
As mentioned in the section [[#Unicode blocks]] above, the canonical source for Unicode blocks is the file ''Blocks.txt''<ref name="Blocks"/> in the Unicode Character Database. The main properties of blocks are described in the Unicode Standard<ref name="Unicode"/> (Section 3.4, paragraph D10b).
 
The verses in the section [[#An example usage of Unicode blocks in ConTeXt]] above are from the Wikipedia article on ''Jabberwocky''<ref>Wikipedia contributors, ''Jabberwocky'', Wikipedia: The Free Encyclopaedia, 2017-11-03, 07:58 UTC, https://en.wikipedia.org/w/index.php?title=Jabberwocky&oldid=808507152, Retrieved 2017-11-03.</ref>.
== References ==
<references/>
99

edits

Navigation menu