- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UFontInfo Class Reference

A struct describing a font and its attributes. More...

#include <ufontinfo.hpp>

List of all members.

Public Types

enum  Family {
  DefaultFamily = 0, Decorative, Serif, SansSerif,
  Script, MonoSpaced
}
enum  Weight {
  AnyWeight = 0, Light = 250, Normal = 400, DemiBold = 600,
  Bold = 700, Black = 900
}
enum  Style {
  AnyStyle = 0, Plain = 1 << 0, Italic = 1 << 1, Underline = 1 << 2,
  StrikeOut = 1 << 3, AntiAliased = 1 << 4, NotAntiAliased = 1 << 5
}
enum  Encoding {
  Encoding_System = 0, Encoding_Default, Encoding_ISO8859_1, Encoding_ISO8859_2,
  Encoding_ISO8859_3, Encoding_ISO8859_4, Encoding_ISO8859_5, Encoding_ISO8859_6,
  Encoding_ISO8859_7, Encoding_ISO8859_8, Encoding_ISO8859_9, Encoding_ISO8859_10,
  Encoding_ISO8859_11, Encoding_ISO8859_12, Encoding_ISO8859_13, Encoding_ISO8859_14,
  Encoding_ISO8859_15, Encoding_ISO8859_MAX, Encoding_UTF8, Encoding_Unicode
}

Public Member Functions

 UFontInfo ()
 UFontInfo (const std::string &face, float pointSize, int weight, int style=Plain, Encoding encoding=Encoding_Default)
 UFontInfo (Family family, float pointSize, int weight, int style=Plain, Encoding encoding=Encoding_Default)
 UFontInfo (Family family, const std::string &face, float pointSize, int weight, int style, Encoding encoding)
unsigned int hashCode () const

Public Attributes

Family family
std::string face
float pointSize
int weight
int style
Encoding encoding

Static Public Attributes

const UFontInfo nullFont

Friends

std::ostream & operator<< (std::ostream &os, const UFontInfo &info)


Detailed Description

A struct describing a font and its attributes.

It is used to query for and load fonts and to get font attributes.

The default way to query for font is to use the UFont class.

If you want to use UFontInfo objects, create them separately via the constructors. You should not access the members of UFontInfo directly.

See also:
UFont
Author:
Johannes Schmidt


Member Enumeration Documentation

enum ufo::UFontInfo::Encoding
 

The character encoding. FIXME: very incomplete

Enumeration values:
Encoding_System  default font encoding for the current system
Encoding_Default  The default encoding.

enum ufo::UFontInfo::Family
 

Some font families. These font families are logical font descriptors which are mapped to valid font faces by the font renderer.

Enumeration values:
DefaultFamily  default font face
Decorative  decorative font face
Serif  serif font face
SansSerif  sans-serif font face
Script  handwriting font face
MonoSpaced  fixed font face

enum ufo::UFontInfo::Style
 

Some style hints.

enum ufo::UFontInfo::Weight
 

The font weight.


Constructor & Destructor Documentation

ufo::UFontInfo::UFontInfo  )  [inline]
 

Creates the null font info struct.


Member Function Documentation

unsigned int ufo::UFontInfo::hashCode  )  const [inline]
 

generates a hash code for this font info


Member Data Documentation

const UFontInfo ufo::UFontInfo::nullFont [static]
 

A null font without any font information,i.e. any style


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt