📄 xglyph.tex
字号:
character map is between 20 and 30 points at 72 dpi resolution. \item \fbox{{\bfseries About}}\\ Shows an `about' message telling you that you are using \verb+xglyph+ and \tonelib\ in the current version.\item \fbox{{\bfseries Exit Program}}\\ This button does what it says and exits the program.\end{itemize}\subsection{The Message Window}This area is located below the dialog box for the teststring. Information potentially useful to the user is given here.There should be nothing needed to be said about the info---it isself-explaining. But two things should be noted:\begin{itemize}\item The elapsed time that is displayed is exactly the time spent in the respective rastering function. There might have been other actions in force which might make the user believe the time value given as being incorrect.\footnote{For example, there might have been size-dependent data to be deleted and recreated, or an encoding file might have needed to be loaded before rastering.} Moreover, the transfer to the X-server may become significant if 32 bits per pixel are used, the image is large and the program is running on a remote machine.\item The message \verb+t1lib: Couldn't generate Bitmap, T1_errno=...!+ simply tells the user that no bitmap could be generated. There may be several reasons. E.g., the \verb+FontID+-value given might have been out of range. Another possibility is that you have specified a character index which has no encoded character associated. The value of \verb+T1_errno+ might give a hint of what the problem was.\end{itemize}If a character map is displayed, the message window is giving noinformation apart from the font name and the final value of\verb+T1_errno+ because there have been executedup to 256 rastering operation and it would be impossible to keep trackof all single operations.\subsection{The Output Window}The output window shows the output of the rastering operations. Its type isdifferent for the standard and the X11 rastering functions. For the standardrastering functions, it is always adapted to the size of the glyph which isdisplayed plus a margin of 5 pixels on each side. For this reason, leading andtrailing white space is not shown in the output window, it only shows up inthe glyph's metrics in the message windows. The X11 rastering functionsgenerate an output window of constant size (\hbox{600 $\times $ 400} pixels)with a logical origin in its center. This center is marked by a cross-hair ofcolor cyan. The glyph is placed with respect to this origin. If it is toolarge to fit, the glyph simply is clipped. A second cross-hair is shown at theplace where the origin of the next glyph would be located in color magenta.If a character map of a font is displayed, the output window containsa map of $16\times 16$ cells whose size depends on the metrics of thefont that is displayed.\subsection{{\tt xglyph} Commandline Parameters}The syntax of the \verb+xglyph+ commandline is \begin{verbatim} xglyph [options] [fontfile1 [fontfile2 [...]]]\end{verbatim}If no options and no font files are specified on the commandline \verb+xglyph+reads the fonts from the font database file. The details depend on whichconfiguration file is found and on this file's contents. If at least one fontfile is specified on the commandline, the font database---being existent andaccessible or not---is ignored and the database is built using the fonts fromthe commandline. \verb+fontfile1+ is assigned the font ID 0, \verb+fontfile2+is assigned the ID 1 and so forth. Files that cannot be opened for some reasonare simply skipped. \verb+xglyph+ also recognizes a few options. Notice that these options are notintended for an average user. Rather, they provide a means of (a) controllingdebugging output from the rasterizer, (b) controlling generation and verbosityof the \tonelib-logfile, (c) disabling certain features of the rasterizer and(d) checking some \tonelib\ functions which otherwise would not be requiredbecause of the limited functionality of \verb+xglyph+.All commandline arguments that start with ``\verb+--+'' are considered to beoptions to \verb+xglyph+. The following is a complete list of valid optionsand a brief description of their effect:\begin{itemize}\item\verb+--help+: Display the commandline syntax of \verb+xglyph+ as well as a brief list of the available options for an average user and exit.\item\verb+--Help+: Display the commandline syntax of \verb+xglyph+ as well as a brief list of all available options.\item\verb+--noGrid+: The cross-hairs marking start and end position of a glyph in the output of one of the X11 rastering functions will be suppressed. This might be useful at small sizes because the grid overwrites the glyphs' pixels.\item\verb+--setPad+: The padding value \verb+xglyph+ should use can be specified here. This has to be followed by either ``8'', ``16'' or ``32'', separated by a space. Notice that the value ``32'' might be rejected as described in \ref{queryconfiguration}. The value actually used can be found by writing a logfile and examining this after a session.\item\verb+--logError+:\item\verb+--logWarning+:\item\verb+--logStatistic+:\item\verb+--logDebug+: These options firstly instruct \verb+xglyph+ to create a \tonelib\ logfile and secondly set the loglevel to the respective value (see \ref{logfile}). Without specifying one of these options, no logfile will be generated.\item\verb+--ignoreForceBold+: Instructs the rasterizer to ignore a {\tt ForceBold} hint in the Type 1 font file. \item\verb+--ignoreFamilyAlignment+: Instructs the rasterizer always to compute font level alignment according to \verb+BlueValues+ and \verb+OtherBlues+, even if \verb+FamilyBlues+ and \\ \verb+FamilyOtherBlues+ exist and all conditions for substitution are fulfilled for that combination of font and size.\item\verb+--ignoreHinting+: Instructs the rasterizer to omit hinting completely.\item\verb+--ignoreAFM+: The use of AFM information is ignored, no matter whether it could be accessed via an appropriate AFM file or self-generated. When using this option the string functions would not work. It may, however, be useful because self-generation of AFM data fails as soon as at least one character of all defined characters can not be processed and thus, the font will refuse to load. Using this option, consequently, one has access to all character that are processible, e.g., for generating a font table. characters that can be rasterized \item\verb+--debugLine+:\item\verb+--debugRegion+:\item\verb+--debugPath+:\item\verb+--debugFont+:\item\verb+--debugHint+: All these instruct the rasterizer to write particular debug messages from intermediate steps of rasterization to the terminal. In order to understand and interprete them, a thorough understanding of the Type 1 font format specification and this special rasterizer implementation is crucial.\item\verb+--checkPerformance+: This option affects the X11 string rastering functions. An additional output window is created and the output of before-mentioned functions is directly written into this window. Note that this window is not managed as might be expected. Text is only drawn at the visible parts and after partially or completely hiding and again raising the respective areas are lost. This mechanism should simply give an idea of how fast the X11 rastering function work, admittedly a critical topic in \tonelib.\item\verb+--checkCopyFont+: This option is used to check the proper functioning of the \verb+T1_CopyFont()+ function. It copies all fonts from the database to new logical fonts and slants these fonts by 0.3. Finally an additional fontfile is added to the database. For each step the new font ID is printed to the terminal and the initial and final number of fonts are printed. \item\verb+--checkConcatGlyphs+: This option affects the buttons \fbox{\bf String} and \fbox{\bf AAString}. The requested string glyph is generated twice, first time using the current value of font ID and second time using this values plus 1. Both resulting glyphs are concatenated and the result is shown in the output window. \item\verb+--checkConcatOutlines+: This option, too, affects the standard string rastering functions. The current test string will be fetched as an outline using the current font ID. The result is then concatenated with a horizontal movement of 1000 charspace unit which is followed by the identical string using a font ID advanced by 1. The result of the concatenated outlines is then filled and converted to a \tonelib-glyph. For details on outline handling and what it is meant for see \ref{outlines}. When \verb+--checkConcatGlyphs+ and \verb+--checkConcatOutlines+ both are specified on commandline, the \verb+--checkConcatGlyphs+ is respected.\item\verb+--checkBadCharHandling+: This option provides a means of examining the effects of problematic/bad characters on string handling in \tonelib with \verb+xglyph+. It affects only the \fbox{\bf String} button. The character to be specified in the test character field is inserted in the middle of the test string. This enables the user to insert arbitrary character codes in the middle of a test string and to watch the effect in \verb+T1_SetString()+. For example, starting \verb+xglyph+ with this option exclusively and immediately clicking \fbox{\bf String} will show the string {\em TeAt} in the output window because the character `s' has been overwritten by character $65_{10}$ (`A'), the default test character.\item\verb+--checkDefaultEncoding+: This option proves that the default encoding feature works correct. If set, all fonts should be encoded in IsoLatin1 encoding immediately after startup and without any slow down at startup. \item\verb+--checkSmartAntialiasing+: Enables smart antialiasing as described in \ref{antialiasing}. The effect is that \tonelib\ will determine the antialiasing level by itself. For sizes below 20~bp, $4\times$ antialiasing will be used and up to 60~bp $2\times$ antialiasing is used. For size of 60~bp and larger a ``bytemap'' is created which in fact consists only of pure background and foreground pixels. When this options has been specified, toggling the antialiasing level has no effect.\item\verb+--checkAACaching+: This option enables caching of antialiased character glyphs. For a discussion of this issue see \ref{aacaching}. The string rastering functions are not affected by this option.\end{itemize}For those who are wondering about special X11 options like ``\verb+-display+'',\verb+xglyph+ does not support these. The widgets are built straight ahead andthe layout is fixed. \verb+xglyph+ is meant to be a tool for testing some ofthe functionalities of \tonelib\ and nothing more. Of course, a display otherthan \verb+localhost:0.0+ may be specified by environment variable\verb+DISPLAY+. \subsection{Fonts Included in the \tonelib-Package}\label{fonts}%Included in the \tonelib-package are 8 fonts of two families whichare freely available. \begin{enumerate}\item The CharterBT-fonts in Roman, Italic, Bold and BoldItalic variants. These are good quality fonts containing kerning information. Notable kerning pairs are ``T''--``e'', ``A''--``V'' and ``A''--``T''.\item The ComputerModern-fonts by Donald E.~Knuth in the variants Roman, Italic, BoldExtended and BoldExtendedItalic. In addition to kerning information, there are many ligatures in these fonts. Most people will know about the present ligatures from using \TeX, the typesetting system. Notable examples are: \verb+--+ $\rightarrow$ ``--'', \verb+---+ $\rightarrow$ ``---'', \verb+fi+ $\rightarrow$ ``fi'' and \verb+ffi+ $\rightarrow$ ``ffi''. These fonts have the disadvantage that no ordinary space character is included, only a visible space. \TeX\ itself does not need a dedicated space character. \end{enumerate}Note that working with ligatures requires the ligatures to beencoded at the positions they are expected. Thus, if you reencode one of thedc-fonts with the IsoLatin1-encoding funny effects may occur.\subsection{Some General Remarks on {\tt xglyph}}The program \verb+xglyph+ is just intended to check whether \tonelib\ works ona particular system. It is written straight forward and does not care much onperformance and such. Especially, it is not a typical application for arasterizer library. The bitmaps are generated and then the output window isadapted to the size of the bitmap/pixmap generated by the rasteringfunction. This contradicts the X11 principle of ``drawing into a drawable''and requires some overhead if one wants a fitted output window. In that sense,the performance of the X11 rastering functions is not directly comparable tothe performance of the standard rastering functions. This should always bekept in mind.%%% Local Variables: %%% mode: latex%%% TeX-master: "t1lib_doc"%%% End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -