Wraps around text, tells fontwrap to process that text.
Normally, (xe)(la)tex will strip whitespace from arguments passed to marcos
because it doesn't use them for spacing purposes. However, sometimes that matters a lot, like when
you're running fontwrap for a mix or normal text and verbatim environments. In these cases, you
can wrap the relevant text in fontwrap's flavour of the verbatim environment:
\begin{verbatimfontwrap}
...
\end{verbatimfontwrap}
Basically this wraps the text in in a new group, within which \obeyspaces and \obeylines have
been triggered, forcing (xe)(la)tex to keep them in. You still need to issue the fontwrap
command though:
\begin{verbatimfontwrap}
\fontwrap{
Your text goes here
}
\end{verbatimfontwrap}
You will almost never need this environment, but if you run into "Overfull \hbox"
warnings, good chance that either fontwrap generated bad code (in which case, contact me!)
or spacing mattered and you forgot to wrap the relevant text in the verbatimfontwrap
environment (try that first. if it still fails, contact me and I can have a lovely
quick debugging session)
\setfontwrapallowedmacros{macro1,
...
macron}
By default fontwrap doesn't process text inside macros, meaning that when it encounters
macros it has not been told it may analyse the text for, it won't. In order to tell it which macros
it may parse the inner text of, you have to pass all macronames as a comma delimited list. For
example, in the fontwrap_example.tex file the list is just 'ruby'. With it set to just ruby,
fontwrap doesn't touch text inside \emph macros, even though normally you would like it to.
Changing the list from 'ruby' to 'ruby,emph' will make it do so.
\setfontwrapallowedenvironments{environment1,
...
environmentn}
In addition to macros, fontwrap needs to be instructed which environments it should be allowed
to work in. For instance, it's typically a bad idea to start adding font tags inside a {verbatim}
environment, so again you can pass it a comma delimited list of environments that fontwrap
is allowed to process (obviously, verbatim usually not be in that list, unless you wanted
to see the effects of fontwrap of course...)
\setunicodeblockfont{Block name}{Font name}
This command tells fontwrap to use a particular font for a particular unicode block. The
name of your font should be the name you see in word processors or font properties, not the filename,
so good fontnames are "Ume Mincho", "Times New Roman" and "Palatino Linotype", and not "MyriadPro-It.otf",
or "pala.ttf". As for which unicode block to change, there are quite a few blocks to pick:
- AegeanNumbers
- AlphabeticPresentationForms
- AncientGreekMusicalNotation
- AncientGreekNumbers
- Arabic
- ArabicPresentationFormsA
- ArabicPresentationFormsB
- ArabicSupplement
- Armenian
- Arrows
- Balinese
- BasicLatin
- Bengali
- BlockElements
- Bopomofo
- BopomofoExtended
- BoxDrawing
- BraillePatterns
- Buginese
- Buhid
- ByzantineMusicalSymbols
- Cherokee
- CJKCompatibility
- CJKCompatibilityForms
- CJKCompatibilityIdeographs
- CJKCompatibilityIdeographsSupplement
- CJKRadicalsSupplement
- CJKStrokes
- CJKSymbolsandPunctuation
- CJKUnifiedIdeographs
- CJKUnifiedIdeographsExtensionA
- CJKUnifiedIdeographsExtensionB
- CombiningDiacriticalMarks
- CombiningDiacriticalMarksforSymbols
- CombiningDiacriticalMarksSupplement
- CombiningHalfMarks
- ControlPictures
- Coptic
- CountingRodNumerals
- Cuneiform
- CuneiformNumbersandPunctuation
- CurrencySymbols
- CypriotSyllabary
- Cyrillic
- CyrillicExtendedA
- CyrillicExtendedB
- CyrillicSupplement
- Deseret
- Devanagari
- Dingbats
- DominoTiles
- EnclosedAlphanumerics
- EnclosedCJKLettersandMonths
- Ethiopic
- EthiopicExtended
- EthiopicSupplement
- GeneralPunctuation
- GeometricShapes
- Georgian
- GeorgianSupplement
- Glagolitic
- Gothic
- GreekandCoptic
- GreekExtended
- Gujarati
- Gurmukhi
- HalfwidthandFullwidthForms
- HangulCompatibilityJamo
- HangulJamo
- HangulSyllables
- Hanunoo
- Hebrew
- HighPrivateUseSurrogates
- HighSurrogates
- Hiragana
- IdeographicDescriptionCharacters
- IPAExtensions
- Kanbun
- KangxiRadicals
- Kannada
- Katakana
- KatakanaPhoneticExtensions
- Kharoshthi
- Khmer
- KhmerSymbols
- Lao
- LatinExtendedAdditional
- LatinExtendedA
- LatinExtendedB
- LatinExtendedC
- LatinExtendedD
- LatinSupplement
- LetterlikeSymbols
- Limbu
- LinearBIdeograms
- LinearBSyllabary
- LowSurrogates
- MahjongTiles
- Malayalam
- MathematicalAlphanumericSymbols
- MathematicalOperators
- MiscellaneousMathematicalSymbolsA
- MiscellaneousMathematicalSymbolsB
- MiscellaneousSymbols
- MiscellaneousSymbolsandArrows
- MiscellaneousTechnical
- ModifierToneLetters
- Mongolian
- MusicalSymbols
- Myanmar
- NewTaiLue
- NKo
- NumberForms
- Ogham
- OldItalic
- OldPersian
- OpticalCharacterRecognition
- Oriya
- Osmanya
- PhagsPa
- Phoenician
- PhoneticExtensions
- PhoneticExtensionsSupplement
- PrivateUseArea
- Runic
- Shavian
- Sinhala
- SmallFormVariants
- SpacingModifierLetters
- Specials
- SuperscriptsandSubscripts
- SupplementalArrowsA
- SupplementalArrowsB
- SupplementalMathematicalOperators
- SupplementalPunctuation
- SupplementaryPrivateUseAreaA
- SupplementaryPrivateUseAreaB
- SylotiNagri
- Syriac
- Tagalog
- Tagbanwa
- Tags
- TaiLe
- TaiXuanJingSymbols
- Tamil
- Telugu
- Thaana
- Thai
- Tibetan
- Tifinagh
- Ugaritic
- UnifiedCanadianAboriginalSyllabics
- VariationSelectors
- VariationSelectorsSupplement
- VerticalForms
- YiRadicals
- YiSyllables
- YijingHexagramSymbols
This is a cumbersome way to go about changing fonts, mostly because typically it means
you need to change too many blocks. As the intention of this package is to have a convenient
set-and-forget system, there is a more convenient setof commands for font binding, based
on informal unicode groups.
\setunicodegroupfont{Group name}{Font name}
This tells fontwrap to bind a particular font to a particular group of unicode blocks.
For instance, if you want to integrally change the font for all the Latin blocks, then you'd
use \setunicodegroupLatinFont{Best Latin Font} and fontwrap will change the font for all
the separate Latin blocks in the previous list. Available informal groups are:
- Arabic
- Chinese
- CJK (combines all Chinese, Japanese and Korean blocks)
- Cyrillic
- Diacritics
- Greek (including some Coptic)
- Korean (individual blocks called 'Hangul')
- Japanese
- Latin
- Mathematics
- Phonetics
- Punctuation
- Symbols
- Yi
- Other - a lump group, which I hope to have unlumped entirely eventually
I'm not a fan of lumpgroups, but I wanted to get this package off the ground in a usable way
first. I shall progressively un-lump the "Other" group, and probably add in a language command
too, so you can use something like \setLanguage(yourfonthere) without having to explicitly
rely on the unicodeblocks (of course, behind the screens language would still be linked
to unicode blocks, but the less you need to know, the more useful a package becomes, right?)
\setfontwrapdefaultfont{fontname}
This tells fontwrap to bind this particular font to every and all unicode blocks. Until you
change the font for some unicode block, this means that fontwrap will only slap a fontcode for
this font at the start of the block you're wrapping, and then do absolutely nothing because it'll
all use the same font anyway.