ObjectivelyMVC
Object oriented MVC framework for SDL3 and GNU C
Loading...
Searching...
No Matches
Font.h File Reference

TrueType fonts. More...

#include <SDL3_ttf/SDL_ttf.h>
#include <Objectively/Enum.h>
#include <Objectively/Array.h>
#include <Objectively/Data.h>
#include <Objectively/String.h>
#include <ObjectivelyMVC/Font+Bitmap.h>
#include <ObjectivelyMVC/Types.h>

Go to the source code of this file.

Data Structures

struct  Font
 TrueType fonts. More...
 
struct  FontAttributes
 The family, size and style attributes that identify a Font, independent of the pixel density at which it is opened. More...
 

Macros

#define DEFAULT_FONT_FAMILY   "Coda"
 
#define DEFAULT_FONT_SIZE   16
 
#define DEFAULT_FONT_STYLE   FontStyleRegular
 
#define DEFAULT_MONOSPACE_FONT_FAMILY   "Share Tech Mono"
 

Enumerations

enum  FontStyle {
  FontStyleRegular = TTF_STYLE_NORMAL , FontStyleBold = TTF_STYLE_BOLD , FontStyleItalic = TTF_STYLE_ITALIC , FontStyleUnderline = TTF_STYLE_UNDERLINE ,
  FontStyleStrikeThrough = TTF_STYLE_STRIKETHROUGH
}
 Font styles. More...
 

Functions

OBJECTIVELYMVC_EXPORT Class * _Font (void)
 

Variables

OBJECTIVELYMVC_EXPORT const EnumName FontStyleNames []
 

Detailed Description

TrueType fonts.

Definition in file Font.h.

Macro Definition Documentation

◆ DEFAULT_FONT_FAMILY

#define DEFAULT_FONT_FAMILY   "Coda"

Definition at line 36 of file Font.h.

◆ DEFAULT_FONT_SIZE

#define DEFAULT_FONT_SIZE   16

Definition at line 37 of file Font.h.

◆ DEFAULT_FONT_STYLE

#define DEFAULT_FONT_STYLE   FontStyleRegular

Definition at line 38 of file Font.h.

◆ DEFAULT_MONOSPACE_FONT_FAMILY

#define DEFAULT_MONOSPACE_FONT_FAMILY   "Share Tech Mono"

Definition at line 40 of file Font.h.

Enumeration Type Documentation

◆ FontStyle

enum FontStyle

Font styles.

Enumerator
FontStyleRegular 
FontStyleBold 
FontStyleItalic 
FontStyleUnderline 
FontStyleStrikeThrough 

Definition at line 50 of file Font.h.

50 {
51 FontStyleRegular = TTF_STYLE_NORMAL,
52 FontStyleBold = TTF_STYLE_BOLD,
53 FontStyleItalic = TTF_STYLE_ITALIC,
54 FontStyleUnderline = TTF_STYLE_UNDERLINE,
55 FontStyleStrikeThrough = TTF_STYLE_STRIKETHROUGH
56} FontStyle;
FontStyle
Font styles.
Definition Font.h:50
@ FontStyleUnderline
Definition Font.h:54
@ FontStyleBold
Definition Font.h:52
@ FontStyleStrikeThrough
Definition Font.h:55
@ FontStyleRegular
Definition Font.h:51
@ FontStyleItalic
Definition Font.h:53

Function Documentation

◆ _Font()

OBJECTIVELYMVC_EXPORT Class * _Font ( void  )

Definition at line 464 of file Font.c.

464 {
465 static Class *clazz;
466 static Once once;
467
468 do_once(&once, {
469 clazz = _initialize(&(const ClassDef) {
470 .name = "Font",
471 .superclass = _Object(),
472 .instanceSize = sizeof(Font),
473 .interfaceSize = sizeof(FontInterface),
474 .initialize = initialize,
475 .destroy = destroy,
476 });
477 });
478
479 return clazz;
480}
static void destroy(Class *clazz)
Definition Font.c:451
static void initialize(Class *clazz)
Definition Font.c:409
TrueType fonts.
Definition Font.h:88

Variable Documentation

◆ FontStyleNames

OBJECTIVELYMVC_EXPORT const EnumName FontStyleNames[]

Definition at line 58 of file Font.h.