libcss
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
font_face.h File Reference
#include <libwapcaplet/libwapcaplet.h>
#include <libcss/errors.h>
#include <libcss/functypes.h>
#include <libcss/properties.h>
#include <libcss/types.h>

Go to the source code of this file.

Typedefs

typedef enum css_font_face_format css_font_face_format
 
typedef enum css_font_face_location_type css_font_face_location_type
 

Enumerations

enum  css_font_face_format {
  CSS_FONT_FACE_FORMAT_UNSPECIFIED = 0x00 , CSS_FONT_FACE_FORMAT_WOFF = 0x01 , CSS_FONT_FACE_FORMAT_OPENTYPE = 0x02 , CSS_FONT_FACE_FORMAT_EMBEDDED_OPENTYPE = 0x04 ,
  CSS_FONT_FACE_FORMAT_SVG = 0x08 , CSS_FONT_FACE_FORMAT_UNKNOWN = 0x10
}
 
enum  css_font_face_location_type { CSS_FONT_FACE_LOCATION_TYPE_UNSPECIFIED = 0 , CSS_FONT_FACE_LOCATION_TYPE_LOCAL = 1 , CSS_FONT_FACE_LOCATION_TYPE_URI = 2 }
 

Functions

css_error css_font_face_get_font_family (const css_font_face *font_face, lwc_string **font_family)
 
css_error css_font_face_count_srcs (const css_font_face *font_face, uint32_t *count)
 
css_error css_font_face_get_src (const css_font_face *font_face, uint32_t index, const css_font_face_src **src)
 
css_error css_font_face_src_get_location (const css_font_face_src *src, lwc_string **location)
 
css_font_face_location_type css_font_face_src_location_type (const css_font_face_src *src)
 
css_font_face_format css_font_face_src_format (const css_font_face_src *src)
 
uint8_t css_font_face_font_style (const css_font_face *font_face)
 
uint8_t css_font_face_font_weight (const css_font_face *font_face)
 

Typedef Documentation

◆ css_font_face_format

◆ css_font_face_location_type

Enumeration Type Documentation

◆ css_font_face_format

Enumerator
CSS_FONT_FACE_FORMAT_UNSPECIFIED 
CSS_FONT_FACE_FORMAT_WOFF 
CSS_FONT_FACE_FORMAT_OPENTYPE 
CSS_FONT_FACE_FORMAT_EMBEDDED_OPENTYPE 
CSS_FONT_FACE_FORMAT_SVG 
CSS_FONT_FACE_FORMAT_UNKNOWN 

◆ css_font_face_location_type

Enumerator
CSS_FONT_FACE_LOCATION_TYPE_UNSPECIFIED 
CSS_FONT_FACE_LOCATION_TYPE_LOCAL 
CSS_FONT_FACE_LOCATION_TYPE_URI 

Function Documentation

◆ css_font_face_count_srcs()

css_error css_font_face_count_srcs ( const css_font_face font_face,
uint32_t *  count 
)

Get the number of potential src locations for a font-face

Parameters
font_faceThe font-face
countPointer to location to receive result
Returns
CSS_OK on success, CSS_BADPARM on bad parameters.

◆ css_font_face_font_style()

uint8_t css_font_face_font_style ( const css_font_face font_face)

Get the style of font for a font-face.

Parameters
srcThe font-face
Returns
The style, as a css_font_style_e

◆ css_font_face_font_weight()

uint8_t css_font_face_font_weight ( const css_font_face font_face)

Get the weight of font for a font-face.

Parameters
srcThe font-face
Returns
The style, as a css_font_weight_e

◆ css_font_face_get_font_family()

css_error css_font_face_get_font_family ( const css_font_face font_face,
lwc_string **  font_family 
)

Get a font-face's font-family name

Parameters
font_faceThe font-face
resultPointer to location to receive result
Returns
CSS_OK on success, CSS_BADPARM on bad parameters.

◆ css_font_face_get_src()

css_error css_font_face_get_src ( const css_font_face font_face,
uint32_t  index,
const css_font_face_src **  src 
)

Get a specific src location from a font-face

Parameters
font_faceThe font-face
indexThe index for the wanted src.
countPointer to location to receive result
Returns
CSS_OK on success, CSS_BADPARM on bad parameters.

◆ css_font_face_src_format()

css_font_face_format css_font_face_src_format ( const css_font_face_src src)

Get the format of font for a font-face src.

Parameters
srcThe font-face src
Returns
The format, if specified

◆ css_font_face_src_get_location()

css_error css_font_face_src_get_location ( const css_font_face_src src,
lwc_string **  location 
)

Get the location for a font-face src.

Parameters
font_faceThe font-face
countPointer to location to receive result
Returns
CSS_OK on success, CSS_BADPARM on bad parameters.
Note
The type of location (local or URL) can be gathered from css_font_face_src_location_type, and the format of font (if specified) from css_font_face_src_format.

◆ css_font_face_src_location_type()

css_font_face_location_type css_font_face_src_location_type ( const css_font_face_src src)

Get the location type for a font-face src.

Parameters
srcThe font-face src
Returns
The location type