22.7.6 Assigning CSS classes based on Unicode character ranges
Suppose your document is translated to a non-Western language: Japanese, for example. After translation, a certain number of words might remain in Latin characters: product names, feature names, and acronyms, for example. The glyphs for Latin characters in common Unicode fonts (such as Mincho) that include Japanese characters might be unacceptably ugly. What you need is an automatic way to specify a different font to use for those glyphs.
Mif2Go provides settings that allow you to assign a CSS class to a range of Unicode characters. You can specify more than one class for a given element; the values are additive, and in case of conflict the latest value in the CSS file overrides earlier values. The order of values in the class attribute itself does not matter. The net effect is that you can use this feature without messing up the display of elements for which you already have other CSS rules. This is essential for the safe use of the feature.
To activate assignment of classes to Unicode character ranges:
; UseCharRangeClasses = No (default); or Yes (to activate settings in
; [CharacterRangeClasses] for marking spans by Unicode char range)
To specify a class to use for spans of characters:
; starting U+ code point (four or five hex digits) = class name,
; - (exclude from all classes), or * (allow in any class).
xxxx = classname optional comment here
zzzz = - exclude from all classes
The named class applies to the character code specified, plus all following character codes up to the next setting. Any text after the first term (class name or symbol) is a comment. The initial state is * (for allow in any class); the last setting should specify - (exclude from all classes).
For example, to flag English and European-language text remaining in a Japanese translation:
003A = latin alpha, some symbols
00A6 = latin Latin-1, diacritics
03E2 = - Ethiopic and many more
To flag Cyrillic in an English document:
> 22 Setting up CSS for HTML > 22.7 Assigning CSS classes > 22.7.6 Assigning CSS classes based on Unicode character ranges