![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/GNUstep/Documentation/Developer/Gui/Reference/ |
Upload File : |
<?xml version="1.0"?> <!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.4//EN" "http://www.gnustep.org/gsdoc-1_0_4.dtd"> <gsdoc base="NSFont" up="Gui"> <head> <title>NSFont</title> <author name="Ovidiu Predescu"> <email address="ovidiu@net-community.com"> ovidiu@net-community.com </email> </author> <abstract>The font class</abstract> <copy>1996 Free Software Foundation, Inc.</copy> </head> <body> <front><contents /></front> <chapter> <heading>NSFont</heading> <p> The NSFont class allows control of the fonts used for displaying text anywhere on the screen. The primary methods for getting a particular font are <ref type="method" id="+fontWithName:matrix:"> +fontWithName:matrix: </ref> and <ref type="method" id="+fontWithName:size:"> +fontWithName:size: </ref> which take the name and size of a particular font and return the NSFont object associated with that font. In addition there are several convenience mathods which make it easier to get certain types of fonts. </p> <p> In particular, there are several methods to get the standard fonts used by the Application to display text for a partiuclar purpose. See the class methods listed below for more information. These default fonts can be set using the user defaults system. The default font names available are: </p> <list> <item> NSBoldFont Helvetica-Bold (System bold font) </item> <item>NSControlContentFont System font</item> <item>NSFont Helvetica (System Font)</item> <item>NSLabelFont System font</item> <item>NSMenuFont System font</item> <item>NSMenuBarFont System font</item> <item>NSMessageFont System font</item> <item>NSPaletteFont System bold font</item> <item>NSTitleBarFont System bold font</item> <item>NSToolTipsFont System font</item> <item>NSUserFixedPitchFont Courier</item> <item>NSUserFont System font</item> </list> <p> The default sizes are: </p> <list> <item>NSBoldFontSize (none)</item> <item>NSControlContentFontSize (none)</item> <item>NSFontSize 12 (System Font Size)</item> <item>NSLabelFontSize (none)</item> <item>NSMenuFontSize (none)</item> <item>NSMiniFontSize 6</item> <item>NSMessageFontSize (none)</item> <item>NSPaletteFontSize (none)</item> <item>NSSmallFontSize 9</item> <item>NSTitleBarFontSize (none)</item> <item>NSToolTipsFontSize (none)</item> <item>NSUserFixedPitchFontSize (none)</item> <item>NSUserFontSize (none)</item> </list> <p> Font sizes list with (none) default to NSFontSize. </p> <class name="NSFont" super="NSObject" ovadd="1.0.0"> <declared>AppKit/NSFont.h</declared> <conform>NSCoding</conform> <conform>NSCopying</conform> <desc> <em>Description forthcoming.</em> </desc> <ivariable type="void*" name="_fontRef" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSFont*" name="cachedFlippedFont" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="NSFont*" name="cachedScreenFont" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="id" name="fontInfo" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="NSString*" name="fontName" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="CGFloat" name="matrix" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="BOOL" name="matrixExplicitlySet" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="int" name="role" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <ivariable type="BOOL" name="screenFont" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <method type="NSFont*" factory="yes" ovadd="1.0.0"> <sel>boldSystemFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <p> Returns the default bold font for use in menus and heading in standard gui components. If <var>fontSize</var> is <= 0, the default size is used. </p> <p> See Also: <ref type="method" id="+fontWithName:size:"> +fontWithName:size: </ref> </p> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>controlContentFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.4.0"> <sel>fontWithDescriptor:</sel> <arg type="NSFontDescriptor*">descriptor</arg> <sel>size:</sel> <arg type="CGFloat">size</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.4.0"> <sel>fontWithDescriptor:</sel> <arg type="NSFontDescriptor*">descriptor</arg> <sel>size:</sel> <arg type="CGFloat">size</arg> <sel>textTransform:</sel> <arg type="NSAffineTransform*">transform</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.4.0"> <sel>fontWithDescriptor:</sel> <arg type="NSFontDescriptor*">descriptor</arg> <sel>textTransform:</sel> <arg type="NSAffineTransform*">transform</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="1.0.0"> <sel>fontWithName:</sel> <arg type="NSString*">aFontName</arg> <sel>matrix:</sel> <arg type="const CGFloat*">fontMatrix</arg> <desc> <p> Returns an autoreleased font with name <var>aFontName</var> and matrix <var>fontMatrix</var>. </p> <p> The <var>fontMatrix</var> is a standard size element matrix as used in PostScript to describe the scaling of the font, typically it just includes the font size as [fontSize 0 0 fontSize 0 0]. You can use the constant NSFontIdentityMatrix in place of [1 0 0 1 0 0]. If NSFontIdentityMatrix, then the font will automatically flip itself when set in a flipped view. </p> </desc> </method> <method type="NSFont*" factory="yes" ovadd="1.0.0"> <sel>fontWithName:</sel> <arg type="NSString*">aFontName</arg> <sel>size:</sel> <arg type="CGFloat">fontSize</arg> <desc> <p> Returns an autoreleased font with name <var>aFontName</var> and size <var>fontSize</var>. </p> <p> Fonts created using this method will automatically flip themselves when set in a flipped view. </p> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>labelFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" factory="yes" ovadd="10.0.0"> <sel>labelFontSize</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>menuBarFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>menuFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>messageFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>paletteFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSArray*" factory="yes" ovadd="1.0.0"> <sel>preferredFontNames</sel> <desc> <p> Returns an array of the names of preferred fonts. </p> <p> See Also: <ref type="method" id="+setPreferredFontNames:"> +setPreferredFontNames: </ref> </p> </desc> </method> <method type="void" factory="yes" ovadd="1.0.0"> <sel>setPreferredFontNames:</sel> <arg type="NSArray*">fontNames</arg> <desc> <p> Sets an array of the names of preferred fonts to fontsNames/ </p> <p> See Also: <ref type="method" id="+preferredFontNames"> +preferredFontNames </ref> </p> </desc> </method> <method type="void" factory="yes" ovadd="1.0.0"> <sel>setUserFixedPitchFont:</sel> <arg type="NSFont*">aFont</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" factory="yes" ovadd="1.0.0"> <sel>setUserFont:</sel> <arg type="NSFont*">aFont</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" factory="yes" ovadd="10.0.0"> <sel>smallSystemFontSize</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="1.0.0"> <sel>systemFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <p> Returns the default font for use in menus and heading in standard gui components. If <var>fontSize</var> is <= 0, the default size is used. </p> <p> See Also: <ref type="method" id="+boldSystemFontOfSize:"> +boldSystemFontOfSize: </ref> userFontOfSize: userFixedPitchFontOfSize: <ref type="method" id="+fontWithName:size:"> +fontWithName:size: </ref> </p> </desc> </method> <method type="CGFloat" factory="yes" ovadd="10.0.0"> <sel>systemFontSize</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" factory="yes" ovadd="10.0.0"> <sel>systemFontSizeForControlSize:</sel> <arg type="NSControlSize">controlSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>titleBarFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="10.0.0"> <sel>toolTipsFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" factory="yes" ovadd="1.0.0"> <sel>useFont:</sel> <arg type="NSString*">aFontName</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" factory="yes" ovadd="1.0.0"> <sel>userFixedPitchFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <p> Returns the default fixed pitch font for use in locations other than standard gui components. If <var>fontSize</var> is <= 0, the default size is used. </p> <p> See Also: <ref type="method" id="+setUserFixedPitchFont:"> +setUserFixedPitchFont: </ref> <ref type="method" id="+userFontOfSize:"> +userFontOfSize: </ref> <ref type="method" id="+boldSystemFontOfSize:"> +boldSystemFontOfSize: </ref> <ref type="method" id="+systemFontOfSize:"> +systemFontOfSize: </ref> <ref type="method" id="+fontWithName:size:"> +fontWithName:size: </ref> </p> </desc> </method> <method type="NSFont*" factory="yes" ovadd="1.0.0"> <sel>userFontOfSize:</sel> <arg type="CGFloat">fontSize</arg> <desc> <p> Returns the default font for use in locations other than standard gui components. If <var>fontSize</var> is <= 0, the default size is used. </p> <p> See Also: <ref type="method" id="+setUserFont:"> +setUserFont: </ref> <ref type="method" id="+boldSystemFontOfSize:"> +boldSystemFontOfSize: </ref> systemFontOfSize: userFixedPitchFontOfSize: <ref type="method" id="+fontWithName:size:"> +fontWithName:size: </ref> </p> </desc> </method> <method type="NSSize" ovadd="1.0.0"> <sel>advancementForGlyph:</sel> <arg type="NSGlyph">aGlyph</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSDictionary*" ovadd="1.0.0"> <sel>afmDictionary</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSString*" ovadd="1.0.0"> <sel>afmFileContents</sel> <desc> <p> This method returns <code>nil</code> in the GNUstep implementation </p> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>ascender</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSRect" ovadd="1.0.0"> <sel>boundingRectForFont</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSRect" ovadd="1.0.0"> <sel>boundingRectForGlyph:</sel> <arg type="NSGlyph">aGlyph</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>capHeight</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSCharacterSet*" ovadd="10.0.0"> <sel>coveredCharacterSet</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>defaultLineHeightForFont</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>descender</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSString*" ovadd="1.0.0"> <sel>displayName</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSString*" ovadd="1.0.0"> <sel>encodingScheme</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSString*" ovadd="1.0.0"> <sel>familyName</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFontDescriptor*" ovadd="10.4.0"> <sel>fontDescriptor</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSString*" ovadd="1.0.0"> <sel>fontName</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.4.0"> <sel>getAdvancements:</sel> <arg type="NSSizeArray">advancements</arg> <sel>forGlyphs:</sel> <arg type="const NSGlyph*">glyphs</arg> <sel>count:</sel> <arg type="NSUInteger">count</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.4.0"> <sel>getAdvancements:</sel> <arg type="NSSizeArray">advancements</arg> <sel>forPackedGlyphs:</sel> <arg type="const void*">glyphs</arg> <sel>count:</sel> <arg type="NSUInteger">count</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.4.0"> <sel>getBoundingRects:</sel> <arg type="NSRectArray">bounds</arg> <sel>forGlyphs:</sel> <arg type="const NSGlyph*">glyphs</arg> <sel>count:</sel> <arg type="NSUInteger">count</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>glyphIsEncoded:</sel> <arg type="NSGlyph">aGlyph</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSMultibyteGlyphPacking" ovadd="1.0.0"> <sel>glyphPacking</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSGlyph" ovadd="1.0.0"> <sel>glyphWithName:</sel> <arg type="NSString*">glyphName</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isBaseFont</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isFixedPitch</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>italicAngle</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="10.4.0"> <sel>leading</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="const CGFloat*" ovadd="1.0.0"> <sel>matrix</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSSize" ovadd="1.0.0"> <sel>maximumAdvancement</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSSize" ovadd="1.0.0"> <sel>minimumAdvancement</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSStringEncoding" ovadd="1.0.0"> <sel>mostCompatibleStringEncoding</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSUInteger" ovadd="10.0.0"> <sel>numberOfGlyphs</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>pointSize</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSPoint" ovadd="1.0.0"> <sel>positionOfGlyph:</sel> <arg type="NSGlyph">aGlyph</arg> <sel>forCharacter:</sel> <arg type="unichar">aChar</arg> <sel>struckOverRect:</sel> <arg type="NSRect">aRect</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSPoint" ovadd="1.0.0"> <sel>positionOfGlyph:</sel> <arg type="NSGlyph">curGlyph</arg> <sel>precededByGlyph:</sel> <arg type="NSGlyph">prevGlyph</arg> <sel>isNominal:</sel> <arg type="BOOL*">nominal</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSPoint" ovadd="1.0.0"> <sel>positionOfGlyph:</sel> <arg type="NSGlyph">aGlyph</arg> <sel>struckOverGlyph:</sel> <arg type="NSGlyph">baseGlyph</arg> <sel>metricsExist:</sel> <arg type="BOOL*">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSPoint" ovadd="1.0.0"> <sel>positionOfGlyph:</sel> <arg type="NSGlyph">aGlyph</arg> <sel>struckOverRect:</sel> <arg type="NSRect">aRect</arg> <sel>metricsExist:</sel> <arg type="BOOL*">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSPoint" ovadd="1.0.0"> <sel>positionOfGlyph:</sel> <arg type="NSGlyph">aGlyph</arg> <sel>withRelation:</sel> <arg type="NSGlyphRelation">relation</arg> <sel>toBaseGlyph:</sel> <arg type="NSGlyph">baseGlyph</arg> <sel>totalAdvancement:</sel> <arg type="NSSize*">offset</arg> <sel>metricsExist:</sel> <arg type="BOOL*">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="int" ovadd="1.0.0"> <sel>positionsForCompositeSequence:</sel> <arg type="NSGlyph*">glyphs</arg> <sel>numberOfGlyphs:</sel> <arg type="int">numGlyphs</arg> <sel>pointArray:</sel> <arg type="NSPoint*">points</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" ovadd="1.0.0"> <sel>printerFont</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFontRenderingMode" ovadd="10.4.0"> <sel>renderingMode</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" ovadd="1.0.0"> <sel>screenFont</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSFont*" ovadd="10.4.0"> <sel>screenFontWithRenderingMode:</sel> <arg type="NSFontRenderingMode">mode</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>set</sel> <desc> Sets the receiver as the font used for text drawing operations. If the current view is a flipped view, the reciever automatically flips itself to display correctly in the flipped view </desc> </method> <method type="void" ovadd="10.4.0"> <sel>setInContext:</sel> <arg type="NSGraphicsContext*">context</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSAffineTransform*" ovadd="10.4.0"> <sel>textTransform</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>underlinePosition</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>underlineThickness</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>widthOfString:</sel> <arg type="NSString*">string</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="CGFloat" ovadd="1.0.0"> <sel>xHeight</sel> <desc> <em>Description forthcoming.</em> </desc> </method> </class> </chapter> <chapter> <heading> Software documentation for the NSFont(GNUstep) category </heading> <category name="GNUstep" class="NSFont" ovadd="10.0.0"> <declared>AppKit/NSFont.h</declared> <desc> <em>Description forthcoming.</em> </desc> <method type="GSFontInfo*" ovadd="10.0.0"> <sel>fontInfo</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void*" ovadd="10.0.0"> <sel>fontRef</sel> <desc> <em>Description forthcoming.</em> </desc> </method> </category> </chapter> </body> </gsdoc>