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 <ObjectivelyMVC/Types.h>

Go to the source code of this file.

Data Structures

struct  Font
 TrueType fonts. More...
 

Macros

#define DEFAULT_FONT_FAMILY   "Coda"
 
#define DEFAULT_FONT_SIZE   16
 
#define DEFAULT_FONT_STYLE   FontStyleRegular
 

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 34 of file Font.h.

◆ DEFAULT_FONT_SIZE

#define DEFAULT_FONT_SIZE   16

Definition at line 35 of file Font.h.

◆ DEFAULT_FONT_STYLE

#define DEFAULT_FONT_STYLE   FontStyleRegular

Definition at line 36 of file Font.h.

Enumeration Type Documentation

◆ FontStyle

enum FontStyle

Font styles.

Enumerator
FontStyleRegular 
FontStyleBold 
FontStyleItalic 
FontStyleUnderline 
FontStyleStrikeThrough 

Definition at line 46 of file Font.h.

46 {
47 FontStyleRegular = TTF_STYLE_NORMAL,
48 FontStyleBold = TTF_STYLE_BOLD,
49 FontStyleItalic = TTF_STYLE_ITALIC,
50 FontStyleUnderline = TTF_STYLE_UNDERLINE,
51 FontStyleStrikeThrough = TTF_STYLE_STRIKETHROUGH
52} FontStyle;
FontStyle
Font styles.
Definition Font.h:46
@ FontStyleUnderline
Definition Font.h:50
@ FontStyleBold
Definition Font.h:48
@ FontStyleStrikeThrough
Definition Font.h:51
@ FontStyleRegular
Definition Font.h:47
@ FontStyleItalic
Definition Font.h:49

Function Documentation

◆ _Font()

OBJECTIVELYMVC_EXPORT Class * _Font ( void  )

Definition at line 355 of file Font.c.

355 {
356 static Class *clazz;
357 static Once once;
358
359 do_once(&once, {
360 clazz = _initialize(&(const ClassDef) {
361 .name = "Font",
362 .superclass = _Object(),
363 .instanceSize = sizeof(Font),
364 .interfaceOffset = offsetof(Font, interface),
365 .interfaceSize = sizeof(FontInterface),
367 .destroy = destroy,
368 });
369 });
370
371 return clazz;
372}
static void destroy(Class *clazz)
Definition Font.c:343
static void initialize(Class *clazz)
Definition Font.c:314
TrueType fonts.
Definition Font.h:63

Variable Documentation

◆ FontStyleNames

OBJECTIVELYMVC_EXPORT const EnumName FontStyleNames[]

Definition at line 54 of file Font.h.