home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _c12c87c1b61bd3796d5cc12731ca9cba < prev    next >
Text File  |  2000-03-23  |  22KB  |  420 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>font - Create and inspect fonts.</TITLE>
  5. <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> font - Create and inspect fonts.</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  23.     <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
  24.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  25.     <LI><A HREF="#font description">FONT DESCRIPTION</A></LI>
  26.     <LI><A HREF="#font metrics">FONT METRICS</A></LI>
  27.     <LI><A HREF="#font options">FONT OPTIONS</A></LI>
  28.     <LI><A HREF="#platformspecific issues">PLATFORM-SPECIFIC ISSUES</A></LI>
  29.     <LI><A HREF="#compatibility with previous versions">COMPATIBILITY WITH PREVIOUS VERSIONS</A></LI>
  30.     <LI><A HREF="#see also">SEE ALSO</A></LI>
  31.     <LI><A HREF="#keywords">KEYWORDS</A></LI>
  32. </UL>
  33. <!-- INDEX END -->
  34.  
  35. <HR>
  36. <P>
  37. <H1><A NAME="name">NAME</A></H1>
  38. <P>font - Create and inspect fonts.</P>
  39. <P>
  40. <HR>
  41. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  42. <UL>
  43. <LI>Linux</LI>
  44. <LI>Solaris</LI>
  45. <LI>Windows</LI>
  46. </UL>
  47. <HR>
  48. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  49. <P>    <EM>$widget</EM>-><STRONG>Font</STRONG>(<EM>option</EM>?, <EM>arg, arg, ...</EM>?)</P>
  50. <P>    <EM>$font</EM>-><EM>Option</EM>?(<EM>arg, arg, ...</EM>)?</P>
  51. <P>
  52. <HR>
  53. <H1><A NAME="description">DESCRIPTION</A></H1>
  54. <P>The <STRONG>Font</STRONG> method provides several facilities for dealing with
  55. fonts, such as defining named fonts and inspecting the actual attributes of
  56. a font.  The command has several different forms, determined by the
  57. first argument.  The following forms are currently supported:</P>
  58. <DL>
  59. <DT><STRONG><A NAME="item_actual"><EM>$font</EM>-><STRONG>actual</STRONG>(<EM>-option</EM>?)</A></STRONG><BR>
  60. <DD>
  61. <DT><STRONG><A NAME="item_fontActual"><EM>$widget</EM>-><STRONG>fontActual</STRONG>(<EM>font</EM>?, <EM>-option</EM>?)</A></STRONG><BR>
  62. <DD>
  63. Returns information about the actual attributes that are obtained when
  64. <EM>font</EM> is used on <EM>$font</EM>'s display; the actual attributes obtained
  65. may differ from the attributes requested due to platform-dependant
  66. limitations, such as the availability of font families and pointsizes.
  67. <EM>font</EM> is a font description; see <A HREF="#font description">FONT DESCRIPTION</A> below.  If
  68. <EM>option</EM> is specified, returns the value of that attribute; if it is
  69. omitted, the return value is a list of all the attributes and their values.
  70. See <A HREF="#font options">FONT OPTIONS</A> below for a list of the possible attributes.
  71. <P></P>
  72. <DT><STRONG><A NAME="item_configure"><EM>$font</EM>-><STRONG>configure</STRONG>(<EM>-option</EM>??=><EM>value</EM>, <EM>-option</EM>=><EM>value</EM>, ...?)</A></STRONG><BR>
  73. <DD>
  74. Query or modify the desired attributes for <EM>$font</EM>.
  75. If no <EM>-option</EM> is specified, returns a list describing
  76. all the options and their values for <EM>fontname</EM>.  If a single <EM>-option</EM>
  77. is specified with no <EM>value</EM>, then returns the current value of that
  78. attribute.  If one or more <EM>option-value</EM> pairs are specified,
  79. then the method modifies the given named font to have the given values; in
  80. this case, all widgets using that font will redisplay themselves using the
  81. new attributes for the font.  See <A HREF="#font options">FONT OPTIONS</A> below for a list of the
  82. possible attributes.
  83. <P>Note: the above behaviour differs in detail to <STRONG>configure</STRONG> on widgets,
  84. images etc.</P>
  85. <P></P>
  86. <DT><STRONG><A NAME="item_Font"><EM>$font</EM> = <EM>$widget</EM>-><STRONG>Font</STRONG>(<EM>-option</EM>=><EM>value</EM>, ...>?)</A></STRONG><BR>
  87. <DD>
  88. <DT><STRONG><A NAME="item_fontCreate"><EM>$font</EM> = <EM>$widget</EM>-><STRONG>fontCreate</STRONG>(?<EM>fontname</EM>??, <EM>-option</EM>=><EM>value</EM>, ...>?)</A></STRONG><BR>
  89. <DD>
  90. Creates a new font object and returns a reference to it.  
  91. <EM>fontname</EM> specifies the name for the font; if it is omitted, then Tk generates
  92. a new name of the form <STRONG>font</STRONG><EM>x</EM>, where <EM>x</EM> is an integer.  There may be any
  93. number of <EM>option-value</EM> pairs, which provide the desired attributes for
  94. the new named font.  See <A HREF="#font options">FONT OPTIONS</A> below for a list of the possible
  95. attributes.
  96. <P>Note: the created font is <EM>not</EM> shared between widgets of different
  97. <A HREF="../../../site/lib/Tk/MainWindow.html">MainWindow</A>s.</P>
  98. <P></P>
  99. <DT><STRONG><A NAME="item_delete"><EM>$font</EM>-><STRONG>delete</STRONG></A></STRONG><BR>
  100. <DD>
  101. <DT><STRONG><A NAME="item_fontDelete"><EM>$widget</EM>-><STRONG>fontDelete</STRONG>(<EM>fontname</EM>?, <EM>fontname</EM>, ...?)</A></STRONG><BR>
  102. <DD>
  103. Delete the specified named fonts.  If there are widgets using the named font,
  104. the named font won't actually be deleted until all the instances are
  105. released.  Those widgets will continue to display using the last known values
  106. for the named font.  If a deleted named font is subsequently recreated with
  107. another call to <STRONG>fontCreate</STRONG>, the widgets will use the new named font
  108. and redisplay themselves using the new attributes of that font.
  109. <P></P>
  110. <DT><STRONG><A NAME="item_fontFamilies"><EM>$widget</EM>-><STRONG>fontFamilies</STRONG></A></STRONG><BR>
  111. <DD>
  112. The return value is a list of the case-insensitive names of all font families
  113. that exist on <EM>$widget</EM>'s display.
  114. <P></P>
  115. <DT><STRONG><A NAME="item_measure"><EM>$font</EM>-><STRONG>measure</STRONG>(<EM>text</EM>)</A></STRONG><BR>
  116. <DD>
  117. <DT><STRONG><A NAME="item_fontMeasure"><EM>$widget</EM>-><STRONG>fontMeasure</STRONG>(<EM>font</EM>, <EM>text</EM>)</A></STRONG><BR>
  118. <DD>
  119. Measures the amount of space the string <EM>text</EM> would use in the given
  120. <EM>font</EM> when displayed in <EM>$widget</EM>.  <EM>font</EM> is a font description;
  121. see <A HREF="#font description">FONT DESCRIPTION</A> below.
  122. The return value is the total width in pixels
  123. of <EM>text</EM>, not including the extra pixels used by highly exagerrated
  124. characters such as cursive ``<EM>f</EM>''.  If the string contains newlines or tabs,
  125. those characters are not expanded or treated specially when measuring the
  126. string.
  127. <P></P>
  128. <DT><STRONG><A NAME="item_metrics"><EM>$font</EM>-><STRONG>metrics</STRONG>(<EM>-option</EM>?)</A></STRONG><BR>
  129. <DD>
  130. <DT><STRONG><A NAME="item_fontMetrics"><EM>$widget</EM>-><STRONG>fontMetrics</STRONG>(<EM>font</EM>?, <EM>-option</EM>?)</A></STRONG><BR>
  131. <DD>
  132. Returns information about the metrics (the font-specific data), for
  133. <EM>font</EM> when it is used on <EM>$widget</EM>'s display.  <EM>font</EM> is a font
  134. description; see <A HREF="#font description">FONT DESCRIPTION</A> below.
  135. If <EM>option</EM> is specified,
  136. returns the value of that metric; if it is omitted, the return value is a
  137. list of all the metrics and their values.  See <A HREF="#font metrics">FONT METRICS</A> below for a list
  138. of the possible metrics.
  139. <P></P>
  140. <DT><STRONG><A NAME="item_fontNames"><EM>$widget</EM>-><STRONG>fontNames</STRONG></A></STRONG><BR>
  141. <DD>
  142. The return value is a list of all font objects that are currently defined for
  143. <EM>$widget</EM>'s MainWindow.
  144. <P></P></DL>
  145. <P>
  146. <HR>
  147. <H1><A NAME="font description">FONT DESCRIPTION</A></H1>
  148. <P>The following formats are accepted as a font description anywhere
  149. <EM>font</EM> is specified as an argument above; these same forms are also
  150. permitted when specifying the <STRONG>-font</STRONG> option for widgets.</P>
  151. <DL>
  152. <DT><STRONG><A NAME="item_%5B1%5D_fontname">[1] <EM>fontname</EM></A></STRONG><BR>
  153. <DD>
  154. The name of a named font, created using the <STRONG>fontCreate</STRONG> method.  When
  155. a widget uses a named font, it is guaranteed that this will never cause an
  156. error, as long as the named font exists, no matter what potentially invalid
  157. or meaningless set of attributes the named font has.  If the named font
  158. cannot be displayed with exactly the specified attributes, some other close
  159. font will be substituted automatically.
  160. <P></P>
  161. <DT><STRONG><A NAME="item_%5B1a%5D_%24font">[1a] <EM>$font</EM></A></STRONG><BR>
  162. <DD>
  163. A font object created using the <STRONG>Font</STRONG> method. This is essentially the same
  164. as using a named font. The object is a reference to the name, and carries
  165. additional information e.g. which MainWindow it relates to in an manner peculiar
  166. to perl/Tk.
  167. <P></P>
  168. <DT><STRONG><A NAME="item_%5B3%5D_systemfont">[3] <EM>systemfont</EM></A></STRONG><BR>
  169. <DD>
  170. The platform-specific name of a font, interpreted by the graphics server.
  171. This also includes, under X, an XLFD (see <A HREF="#[4]">[4]</A>) for which a single ``<STRONG>*</STRONG>''
  172. character was used to elide more than one field in the middle of the
  173. name.  See <A HREF="#platformspecific issues">PLATFORM-SPECIFIC ISSUES</A> for a list of the system fonts.
  174. <P></P>
  175. <DT><STRONG><A NAME="item_%5B3%5D_%5Bfamily%2C%3Fsize%2C%3F%3Fstyle%2C%3F%3F">[3] [<EM>family</EM>,?<EM>size</EM>,??<EM>style</EM>,??<EM>style ...</EM>?]</A></STRONG><BR>
  176. <DD>
  177. A properly formed list whose first element is the desired font
  178. <EM>family</EM> and whose optional second element is the desired <EM>size</EM>.
  179. The interpretation of the <EM>size</EM> attribute follows the same rules
  180. described for <A HREF="#size">-size</A> in <A HREF="#font options">FONT OPTIONS</A> below.  Any additional optional
  181. arguments following the <EM>size</EM> are font <EM>style</EM>s.  Possible values
  182. for the <EM>style</EM> arguments are as follows:
  183. <PRE>
  184.     normal      bold    roman   italic
  185.     underline   overstrike</PRE>
  186. <P></P>
  187. <DT><STRONG><A NAME="item_names">[4] X-font names (XLFD)</A></STRONG><BR>
  188. <DD>
  189. A Unix-centric font name of the form
  190. <EM>-foundry-family-weight-slant-setwidth-addstyle-pixel-point-resx-resy-spacing-width-charset-encoding</EM>.
  191. The ``<STRONG>*</STRONG>'' character may be used to skip individual fields that the
  192. user does not care about.  There must be exactly one ``<STRONG>*</STRONG>'' for each
  193. field skipped, except that a ``<STRONG>*</STRONG>'' at the end of the XLFD skips any
  194. remaining fields; the shortest valid XLFD is simply ``<STRONG>*</STRONG>'', signifying
  195. all fields as defaults.  Any fields that were skipped are given default
  196. values.  For compatibility, an XLFD always chooses a font of the specified
  197. pixel size (not point size); although this interpretation is not strictly
  198. correct, all existing applications using XLFDs assumed that one ``point''
  199. was in fact one pixel and would display incorrectly (generally larger) if
  200. the correct size font were actually used.
  201. <P></P>
  202. <DT><STRONG><A NAME="item_%5B5%5D_option_value_%3Foption_value_%2E%2E%2E%3F">[5] <EM>option value </EM>?<EM>option value ...</EM>?</A></STRONG><BR>
  203. <DD>
  204. A properly formed list of <EM>option-value</EM> pairs that specify
  205. the desired attributes of the font, in the same format used when defining
  206. a named font; see <A HREF="#font options">FONT OPTIONS</A> below.
  207. <P></P></DL>
  208. <P>When font description <EM>font</EM> is used, the system attempts to parse the
  209. description according to each of the above five rules, in the order specified.
  210. Cases [1] and [2] must match the name of an existing named font or of a
  211. system font.  Cases [3], [4], and [5] are accepted on all
  212. platforms and the closest available font will be used.  In some situations
  213. it may not be possible to find any close font (e.g., the font family was
  214. a garbage value); in that case, some system-dependant default font is
  215. chosen.  If the font description does not match any of the above patterns,
  216. an error is generated.</P>
  217. <P>
  218. <HR>
  219. <H1><A NAME="font metrics">FONT METRICS</A></H1>
  220. <P>The following options are used by the <STRONG>metrics</STRONG>/<STRONG>fontMetrics</STRONG> method to query
  221. font-specific data determined when the font was created.  These properties are
  222. for the whole font itself and not for individual characters drawn in that
  223. font.  In the following definitions, the ``baseline'' of a font is the
  224. horizontal line where the bottom of most letters line up; certain letters,
  225. such as lower-case ``g'' stick below the baseline.</P>
  226. <DL>
  227. <DT><STRONG><A NAME="item_%2Dascent"><STRONG>-ascent</STRONG></A></STRONG><BR>
  228. <DD>
  229. The amount in pixels that the tallest letter sticks up above the baseline of
  230. the font, plus any extra blank space added by the designer of the font.
  231. (<EM>$font</EM>-<gt><STRONG>ascent</STRONG> is provided for compatibility.)
  232. <P></P>
  233. <DT><STRONG><A NAME="item_%2Ddescent"><STRONG>-descent</STRONG></A></STRONG><BR>
  234. <DD>
  235. The largest amount in pixels that any letter sticks down below the baseline
  236. of the font, plus any extra blank space added by the designer of the font.
  237. (<EM>$font</EM>-<gt><STRONG>descent</STRONG> is provided for compatibility.)
  238. <P></P>
  239. <DT><STRONG><A NAME="item_%2Dlinespace"><STRONG>-linespace</STRONG></A></STRONG><BR>
  240. <DD>
  241. Returns how far apart vertically in pixels two lines of text using the same
  242. font should be placed so that none of the characters in one line overlap any
  243. of the characters in the other line.  This is generally the sum of the ascent
  244. above the baseline line plus the descent below the baseline.
  245. <P></P>
  246. <DT><STRONG><A NAME="item_%2Dfixed"><STRONG>-fixed</STRONG></A></STRONG><BR>
  247. <DD>
  248. Returns a boolean flag that is ``<STRONG>1</STRONG>'' if this is a fixed-width font,
  249. where each normal character is the the same width as all the other
  250. characters, or is ``<STRONG>0</STRONG>'' if this is a proportionally-spaced font, where
  251. individual characters have different widths.  The widths of control
  252. characters, tab characters, and other non-printing characters are not
  253. included when calculating this value.
  254. <P></P></DL>
  255. <P>
  256. <HR>
  257. <H1><A NAME="font options">FONT OPTIONS</A></H1>
  258. <P>The following options are supported on all platforms, and are used when
  259. constructing a named font or when specifying a font using style [5] as
  260. above:</P>
  261. <DL>
  262. <DT><STRONG><A NAME="item_%2Dfamily_%3D%3E_name"><STRONG>-family</STRONG> => <EM>name</EM></A></STRONG><BR>
  263. <DD>
  264. The case-insensitive font family name.  Tk guarantees to support the font
  265. families named <STRONG>Courier</STRONG> (a monospaced ``typewriter'' font), <STRONG>Times</STRONG>
  266. (a serifed ``newspaper'' font), and <STRONG>Helvetica</STRONG> (a sans-serif
  267. ``European'' font).  The most closely matching native font family will
  268. automatically be substituted when one of the above font families is used.
  269. The <EM>name</EM> may also be the name of a native, platform-specific font
  270. family; in that case it will work as desired on one platform but may not
  271. display correctly on other platforms.  If the family is unspecified or
  272. unrecognized, a platform-specific default font will be chosen.
  273. <P></P>
  274. <DT><STRONG><A NAME="item_%2Dsize_%3D%3E_size"><STRONG>-size</STRONG> => <EM>size</EM></A></STRONG><BR>
  275. <DD>
  276. The desired size of the font.  If the <EM>size</EM> argument is a positive
  277. number, it is interpreted as a size in points.  If <EM>size</EM> is a negative
  278. number, its absolute value is interpreted as a size in pixels.  If a
  279. font cannot be displayed at the specified size, a nearby size will be
  280. chosen.  If <EM>size</EM> is unspecified or zero, a platform-dependent default
  281. size will be chosen.
  282.  
  283. <PRE>
  284.  
  285. The original Tcl/Tk authors believe sizes should normally be specified in points
  286. so the application will remain the same ruler size on the screen, even when
  287. changing screen resolutions or moving scripts across platforms. While this is an
  288. admirable goal it does not work as well in practice as they hoped.
  289. The mapping between points and  pixels is set when the application starts, based
  290. on alleged properties of the installed monitor, but it can be overridden by
  291. calling the  L<scaling|Tk::Widget/scaling> command. However this can be
  292. problematic when system has no way of telling if (say) an 11" or 22" monitor is
  293. attached, also if it I<can> tell then some monitor sizes may result in poorer
  294. quality scaled fonts being used rather than a "tuned" bitmap font. 
  295. In addition specifying pixels is useful in certain circumstances such as when a piece of text
  296. must line up with respect to a fixed-size bitmap.</PRE>
  297. <P>At present the Tcl/Tk scheme is used unchanged, with ``point'' size being returned
  298. by <EM>actual</EM> (as an integer), and used internally. Suggestions for work-rounds
  299. to undesirable behaviour welcome.</P>
  300. <P></P>
  301. <DT><STRONG><A NAME="item_%2Dweight_%3D%3E_weight"><STRONG>-weight</STRONG> => <EM>weight</EM></A></STRONG><BR>
  302. <DD>
  303. The nominal thickness of the characters in the font.  The value
  304. <STRONG>normal</STRONG> specifies a normal weight font, while <STRONG>bold</STRONG> specifies a
  305. bold font.  The closest available weight to the one specified will
  306. be chosen.  The default weight is <STRONG>normal</STRONG>.
  307. <P></P>
  308. <DT><STRONG><A NAME="item_%2Dslant_%3D%3E_slant"><STRONG>-slant</STRONG> => <EM>slant</EM></A></STRONG><BR>
  309. <DD>
  310. The amount the characters in the font are slanted away from the
  311. vertical.  Valid values for slant are <STRONG>roman</STRONG> and <STRONG>italic</STRONG>.
  312. A roman font is the normal, upright appearance of a font, while
  313. an italic font is one that is tilted some number of degrees from upright.
  314. The closest available slant to the one specified will be chosen.
  315. The default slant is <STRONG>roman</STRONG>.
  316. <P></P>
  317. <DT><STRONG><A NAME="item_%2Dunderline_%3D%3E_boolean"><STRONG>-underline</STRONG> => <EM>boolean</EM></A></STRONG><BR>
  318. <DD>
  319. The value is a boolean flag that specifies whether characters in this
  320. font should be underlined.  The default value for underline is <STRONG>false</STRONG>.
  321. <P></P>
  322. <DT><STRONG><A NAME="item_%2Doverstrike_%3D%3E_boolean"><STRONG>-overstrike</STRONG> => <EM>boolean</EM></A></STRONG><BR>
  323. <DD>
  324. The value is a boolean flag that specifies whether a horizontal line should
  325. be drawn through the middle of characters in this font.  The default value
  326. for overstrike is <STRONG>false</STRONG>.
  327. <P></P></DL>
  328. <P>
  329. <HR>
  330. <H1><A NAME="platformspecific issues">PLATFORM-SPECIFIC ISSUES</A></H1>
  331. <P>The following named system fonts are supported:</P>
  332. <DL>
  333. <DT><STRONG><A NAME="item_X_Windows%3A">X Windows:</A></STRONG><BR>
  334. <DD>
  335. All valid X font names, including those listed by xlsfonts(1), are available.
  336. <P></P>
  337. <DT><STRONG><A NAME="item_MS_Windows%3A">MS Windows:</A></STRONG><BR>
  338. <DD>
  339. <PRE>
  340.  system       ansi       device
  341.  systemfixed  ansifixed  oemfixed</PRE>
  342. <DT><STRONG><A NAME="item_Macintosh%3A">Macintosh:</A></STRONG><BR>
  343. <DD>
  344. <PRE>
  345.  system       application</PRE>
  346. </DL>
  347. <P>
  348. <HR>
  349. <H1><A NAME="compatibility with previous versions">COMPATIBILITY WITH PREVIOUS VERSIONS</A></H1>
  350. <P>In prior versions of perl/Tk the <EM>$widget</EM>-><STRONG>Font</STRONG> method was a perl
  351. wrapper on the original ``[4] X-font names (XLFD)'' style as described above
  352. (which was the only form supported by versions of core tk prior to version
  353. tk8.0). 
  354. This module is provided in its original form (it has just been renamed)
  355. via:</P>
  356. <PRE>
  357.  use Tk::X11Font;
  358.  I<$widget>-E<gt>B<X11Font>(...)</PRE>
  359. <P>However the methods of the old scheme have been mimiced as closely as possible
  360. with the new scheme. It is intended that code should work without modification,
  361. except for the case of using :</P>
  362. <PRE>
  363.   @names = $font->Name;</PRE>
  364. <P>i.e. the <EM>Name</EM> method in an array/list context. This now returns one element 
  365. on all platforms (as it did on Win32), while previously on X systems it returned
  366. a list of fonts that matched an under-specified pattern.</P>
  367. <P>Briefly the methods supported for compatibilty are as follows:</P>
  368. <DL>
  369. <DT><STRONG><A NAME="item_Clone">$newfont = <EM>$font</EM>-><STRONG>Clone</STRONG>(<EM>-option</EM>=><EM>value</EM>, ...>?)</A></STRONG><BR>
  370. <DD>
  371. Returns a new font object <EM>$newfont</EM> related to the original <EM>$font</EM> by 
  372. changing the values of the specified <EM>-option</EM>s.
  373. <P></P>
  374. <DT><STRONG><A NAME="item_Family"><EM>$font</EM>->Family - maps to -family</A></STRONG><BR>
  375. <DD>
  376. <DT><STRONG><A NAME="item_Weight"><EM>$font</EM>->Weight - maps to -weight</A></STRONG><BR>
  377. <DD>
  378. <DT><STRONG><A NAME="item_Slant"><EM>$font</EM>->Slant - maps to -slant</A></STRONG><BR>
  379. <DD>
  380. <DT><STRONG><A NAME="item_Pixel"><EM>$font</EM>->Pixel and Point - map to -size</A></STRONG><BR>
  381. <DD>
  382. </DL>
  383. <P>New code should use <EM>$font</EM>-><STRONG>configure</STRONG> to achieve same effect as last
  384. four items above.</P>
  385. <DL>
  386. <DT><STRONG><A NAME="item_Foundry%2C_Swidth%2C_Adstyle%2C_Xres%2C_Yres%2C_Sp">Foundry, Swidth, Adstyle, Xres, Yres, Space, Avgwidth, Registry, Encoding</A></STRONG><BR>
  387. <DD>
  388. Are all ignored if set, and return '*' if queried.
  389. <P></P>
  390. <DT><STRONG><A NAME="item_Name"><EM>$font</EM>-><STRONG>Name</STRONG></A></STRONG><BR>
  391. <DD>
  392. Returns the name of a named font, or a string representation of an unnamed
  393. font. Using <EM>$font</EM> in a scalar context does the same. Note this is distinctly
  394. different from behaviour of <A HREF="../../../site/lib/Tk/X11Font.html#name( [ $max ] )">X11Font's Name</A> in
  395. a list context.
  396. <P></P>
  397. <DT><STRONG><A NAME="item_Pattern"><EM>$font</EM>-><STRONG>Pattern</STRONG></A></STRONG><BR>
  398. <DD>
  399. Returns a XLFD string for the font based on <EM>actual</EM> values, and some heuristics
  400. to map Tk's forms to the ``standard'' X conventions.
  401. <P></P></DL>
  402. <P>
  403. <HR>
  404. <H1><A NAME="see also">SEE ALSO</A></H1>
  405. <P><A HREF="../../../site/lib/Tk/options.html">Tk::options</A></P>
  406. <P><A HREF="../../../site/lib/Tk/X11Font.html">Tk::X11Font</A></P>
  407. <P>
  408. <HR>
  409. <H1><A NAME="keywords">KEYWORDS</A></H1>
  410. <P>font</P>
  411. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  412. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  413. <STRONG><P CLASS=block> font - Create and inspect fonts.</P></STRONG>
  414. </TD></TR>
  415. </TABLE>
  416.  
  417. </BODY>
  418.  
  419. </HTML>
  420.