com.threerings.opengl.gui.config
Class FontConfig

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.config.ManagedConfig
          extended by com.threerings.opengl.gui.config.FontConfig
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Exportable, com.threerings.resource.ResourceManager.ModificationObserver, Copyable, Cloneable

public class FontConfig
extends ManagedConfig

Describes a cursor.


Nested Class Summary
static class FontConfig.Style
          The available font styles.
 
Field Summary
 boolean antialias
          Whether or not the font should be antialiased.
 String file
          The font file.
static FontConfig NULL
          An object to use when the config cannot be resolved.
 
Constructor Summary
FontConfig()
           
 
Method Summary
 TextFactory getTextFactory(GlContext ctx, FontConfig.Style style, int size)
          Returns the text factory for this font with the specified style and point size.
 TextFactory getTextFactory(GlContext ctx, int style, int size)
          Returns the text factory for this font with the specified style and point size.
 
Methods inherited from class com.threerings.config.ManagedConfig
addListener, configUpdated, getConfigManager, getInstance, getInstance, getInstance, getInstance, getInstance, getName, getReference, init, removeListener, resourceModified, setName, updateFromSource, validateOuters, validateReferences, wasUpdated
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final FontConfig NULL
An object to use when the config cannot be resolved.


file

@Editable(editor="resource",
          nullable=true)
@FileConstraints(description="m.font_files_desc",
                 extensions=".ttf",
                 directory="font_dir")
public String file
The font file.


antialias

@Editable
public boolean antialias
Whether or not the font should be antialiased.

Constructor Detail

FontConfig

public FontConfig()
Method Detail

getTextFactory

public TextFactory getTextFactory(GlContext ctx,
                                  FontConfig.Style style,
                                  int size)
Returns the text factory for this font with the specified style and point size.


getTextFactory

public TextFactory getTextFactory(GlContext ctx,
                                  int style,
                                  int size)
Returns the text factory for this font with the specified style and point size.



Copyright © 2011. All Rights Reserved.