⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tfontenc.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name:        tfontenc.tex%% Purpose:     font encoding overview%% Author:      Vadim Zeitlin%% Modified by:%% Created:     03.11.99%% RCS-ID:      $Id: tfontenc.tex,v 1.8 2005/02/22 15:09:54 ABX Exp $%% Copyright:   (c) Vadim Zeitlin%% License:     wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{Font encoding overview}\label{wxfontencodingoverview}wxWidgets has support for multiple font encodings starting from release 2.2.By encoding we mean here the mapping between the character codes and theletters. Probably the most well-known encoding is (7 bit) ASCII one which isused almost universally now to represent the letters of the English alphabetand some other common characters. However, it is not enough to represent theletters of foreign alphabets and here other encodings come into play. Pleasenote that we will only discuss 8-bit fonts here and not \helpref{Unicode}{unicode}.Font encoding support is ensured by several classes: \helpref{wxFont}{wxfont} itself, but also \helpref{wxFontEnumerator}{wxfontenumerator} and \helpref{wxFontMapper}{wxfontmapper}. wxFont encoding support is reflected bya (new) constructor parameter {\it encoding} which takes one of the followingvalues (elements of enumeration type {\tt wxFontEncoding}):\begin{twocollist}\twocolitem{wxFONTENCODING\_SYSTEM}{The default encoding of the underlyingoperating system (notice that this might be a "foreign" encoding for foreignversions of Windows 9x/NT).}\twocolitem{wxFONTENCODING\_DEFAULT}{The applications default encoding asreturned by \helpref{wxFont::GetDefaultEncoding}{wxfontgetdefaultencoding}. Onprogram startup, the applications default encoding is the same aswxFONTENCODING\_SYSTEM, but may be changed to make all the fonts created laterto use it (by default).}\twocolitem{wxFONTENCODING\_ISO8859\_1..15}{ISO8859 family encodings which areusually used by all non-Microsoft operating systems}\twocolitem{wxFONTENCODING\_KOI8}{Standard Cyrillic encoding for the Internet(but see also wxFONTENCODING\_ISO8859\_5 and wxFONTENCODING\_CP1251)}\twocolitem{wxFONTENCODING\_CP1250}{Microsoft analogue of ISO8859-2}\twocolitem{wxFONTENCODING\_CP1251}{Microsoft analogue of ISO8859-5}\twocolitem{wxFONTENCODING\_CP1252}{Microsoft analogue of ISO8859-1}\end{twocollist}As you may see, Microsoft's encoding partly mirror the standard ISO8859 ones,but there are (minor) differences even between ISO8859-1 (Latin1, ISO encodingfor Western Europe) and CP1251 (WinLatin1, standard code page for Englishversions of Windows) and there are more of them for other encodings.The situation is particularly complicated with Cyrillic encodings for which(more than) three incompatible encodings exist: KOI8 (the old standard, widelyused on the Internet), ISO8859-5 (ISO standard for Cyrillic) and CP1251(WinCyrillic).This abundance of (incompatible) encodings should make it clear that usingencodings is less easy than it might seem. The problems arise both from thefact that the standard encodings for the given language (say Russian, which iswritten in Cyrillic) are different on different platforms and because thefonts in the given encoding might just not be installed (this is especially aproblem with Unix, or, in general, non-Win32 systems).To clarify, the \helpref{wxFontEnumerator}{wxfontenumerator} class may be used to enumerate both all available encodings and to find thefacename(s) in which the given encoding exists. If you can find the font inthe correct encoding with wxFontEnumerator then your troubles are over, but,unfortunately, sometimes this is not enough. For example, there is no standardway (that I know of, please tell me if you do!) to find a font on a Windows systemfor KOI8 encoding (only for WinCyrillic one which is quite different), so \helpref{wxFontEnumerator}{wxfontenumerator} will never return one, even ifthe user has installed a KOI8 font on his system.To solve this problem, a \helpref{wxFontMapper}{wxfontmapper} class is provided.This class stores the mapping between the encodings and the font facenames which support them in \helpref{wxConfig}{wxconfigoverview} object. Ofcourse, it would be fairly useless if it tried to determine these mappings byitself, so, instead, it (optionally) asks the user and remembers his answersso that the next time the program will automatically choose the correct font.All these topics are illustrated by the \helpref{font sample}{samplefont};please refer to it and the documentation of the classes mentioned here forfurther explanations.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -