2002-09-25 02:49:57 +04:00
< HTML >
< HEAD >
< TITLE > FontFamily.htm< / TITLE >
< style type = "text/css" >
<!--
.Default {background-color: rgb(255,255,255); color: rgb(0,0,0); font-family: 'Dutch801 Rm BT'; font-size: 12pt}
.OBOS-Function-Def {background-color: rgb(255,255,255); color: rgb(0,0,0); font-family: 'Dutch801 Rm BT'; font-size: 16pt}
.OBOS-Title {background-color: rgb(255,255,255); color: rgb(0,128,0); font-family: 'Dutch801 Rm BT'; font-size: 24pt}
.Text-Background {background-color: rgb(255,255,255)}
.GR-Default {}
.Body {margin: 0px}
.Footer {margin: 0px}
.Header {margin: 0px}
.WP-Default {text-align: left; text-indent: 0px; margin-left: 0px; margin-right: 0px}
-->
< / style >
< / HEAD >
< BODY BGCOLOR = "#ffffff" >
< DIV class = "sheet" id = "Sheet 1" >
< P class = "Body" style = "margin: 0px" > < span class = "OBOS-Title" > FontFamily class< / span > < span style = "color: rgb(0,0,0); font-size: 24pt" > < / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
FontFamily objects are used to tie together all related font styles.< / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
< HR >
< / P >
< P class = "Body" style = "margin: 0px" > Member Functions< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< / P >
2002-12-08 00:39:48 +03:00
< TABLE WIDTH = 463 HEIGHT = 90 BORDER = 1 CELLPADDING = 1 CELLSPACING = 2 >
2002-09-25 02:49:57 +04:00
< TR >
< TD WIDTH = 203 HEIGHT = 17 >
2002-12-08 00:39:48 +03:00
< P class = "Body" style = "margin: 0px" > FontFamily(const char *name)< / P >
2002-09-25 02:49:57 +04:00
< / TD >
< TD WIDTH = 260 HEIGHT = 17 >
< P class = "Body" style = "margin: 0px" > ~FontFamily(void)< / P >
< / TD >
< / TR >
2002-12-08 00:39:48 +03:00
< TR >
< TD WIDTH = 203 HEIGHT = 22 >
< P class = "Body" style = "margin: 0px" > const char *GetName(void)< / P >
< / TD >
< TD WIDTH = 260 HEIGHT = 22 >
< P class = "Body" style = "margin: 0px" > void AddStyle(const char *path, FT_Face face)< / P >
< / TD >
< / TR >
2002-09-25 02:49:57 +04:00
< TR >
< TD WIDTH = 203 HEIGHT = 17 >
2002-12-08 00:39:48 +03:00
< P class = "Body" style = "margin: 0px" > void RemoveStyle(const char *style)< / P >
2002-09-25 02:49:57 +04:00
< / TD >
< TD WIDTH = 260 HEIGHT = 17 >
2002-12-08 00:39:48 +03:00
< P class = "Body" style = "margin: 0px" > FontStyle *GetStyle(const char *stylename)< / P >
2002-09-25 02:49:57 +04:00
< / TD >
< / TR >
< TR >
< TD WIDTH = 203 HEIGHT = 17 >
2002-12-08 00:39:48 +03:00
< P class = "Body" style = "margin: 0px" > const char *GetStyle(int32 index)< / P >
2002-09-25 02:49:57 +04:00
< / TD >
< TD WIDTH = 260 HEIGHT = 17 >
2002-12-08 00:39:48 +03:00
< P class = "Body" style = "margin: 0px" > int32 CountStyles(void)< / P >
2002-09-25 02:49:57 +04:00
< / TD >
< / TR >
2002-12-08 00:39:48 +03:00
< TR >
< TD WIDTH = 203 HEIGHT = 17 >
< P class = "Body" style = "margin: 0px" > bool HasStyle(const char *style)< / P >
< / TD >
< TD WIDTH = 260 HEIGHT = 17 >
< / TD >
< / TR >
2002-09-25 02:49:57 +04:00
< / TABLE >
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
< BR >
< HR >
< / P >
2002-12-08 00:39:48 +03:00
< P class = "Body" style = "margin: 0px" > < span class = "OBOS-Function-Def" > FontFamily(const char *name)< / span > < / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
1) Create and set internal name to the one passed to the constructor< / P >
< P class = "Body" style = "margin: 0px" > 2) Create the styles list< / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
< span class = "OBOS-Function-Def" > ~FontFamily(void)< / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
1) delete the internal name< / P >
< P class = "Body" style = "margin: 0px" > 2) empty and delete the internal style list< / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
2002-12-08 00:39:48 +03:00
< span class = "OBOS-Function-Def" > const char *GetName(void)< / span > < / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
Returns the internal family name< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
2002-12-08 00:39:48 +03:00
< span class = "OBOS-Function-Def" > void AddStyle(const char *path, FT_Face face)< / span > < / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
Adds the style to the family.< / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
1) Create the FontStyle object and add it to the style list.< / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
2002-12-08 00:39:48 +03:00
< span class = "OBOS-Function-Def" > void RemoveStyle(const char *style)< / span > < / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
Removes the style from the FontFamily object.< / P >
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
1) Call GetStyle on the given pointer< / P >
< P class = "Body" style = "margin: 0px" > 2) If non-NULL, delete the object< / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > 3) If the style list is now empty, ask the FontServer to remove it from the family list< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
2002-12-08 00:39:48 +03:00
< span class = "OBOS-Function-Def" > FontStyle *GetStyle(const char *style)< / span > < / P >
2002-09-25 02:49:57 +04:00
< P class = "Body" style = "margin: 0px" > < BR >
Looks up a FontStyle object based on its style name. Returns NULL if not found.< / P >
< P class = "Body" style = "margin: 0px" > < BR >
2002-12-08 00:39:48 +03:00
1) Iterate through the style list< / P >
< P class = "Body" style = "margin: 0px" > a) compare < span style = "font-style: italic" > style< / span > to each FontStyle object's GetName method and return the object if they are the same< / P >
< P class = "Body" style = "margin: 0px" > 2) If all items have been checked and nothing has been returned, return NULL< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
< span class = "OBOS-Function-Def" > const char *GetStyle(int32 index)< / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
Returns the name of the style at < span style = "font-style: italic" > index< / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
1) Get the FontStyle item at < span style = "font-style: italic" > index< / span > obtained via the style list's ItemAt call< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
< span class = "OBOS-Function-Def" > int32 CountStyles(void)< / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
Returns the number of items in the style list and, thus, the number of styles in the family< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< BR >
< span class = "OBOS-Function-Def" > bool HasStyle(const char *stylename)< / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
Returns true if the family has a style with the name < span style = "font-style: italic" > stylename< / span > < / P >
< P class = "Body" style = "margin: 0px" > < BR >
1) Call GetStyle on the style name and return false if NULL, true if not.< / P >
< P class = "Body" style = "margin: 0px" > < BR >
< / P >
2002-09-25 02:49:57 +04:00
< DIV class = "layer" id = "Layer 1" >
< / DIV >
< / DIV >
< / BODY >
< / HTML >