font.hpp -> font.h
This commit is contained in:
parent
eeb2de8de1
commit
870254efd2
@ -20,7 +20,7 @@
|
||||
#include "palette.hpp"
|
||||
#include "sh7091/serial.hpp"
|
||||
|
||||
#include "font/font.hpp"
|
||||
#include "font/font.h"
|
||||
#include "font/dejavusansmono/dejavusansmono.data.h"
|
||||
|
||||
struct vertex {
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "twiddle.hpp"
|
||||
#include "palette.hpp"
|
||||
|
||||
#include "font/font.hpp"
|
||||
#include "font/font.h"
|
||||
#include "font/dejavusansmono/dejavusansmono_mono.data.h"
|
||||
|
||||
struct vertex {
|
||||
|
@ -1,7 +1,11 @@
|
||||
// this file is designed to be platform-agnostic
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// metrics are 26.6 fixed point
|
||||
struct glyph_metrics {
|
||||
@ -10,7 +14,7 @@ struct glyph_metrics {
|
||||
int32_t horiAdvance;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static_assert((sizeof (glyph_metrics)) == ((sizeof (int32_t)) * 3));
|
||||
static_assert((sizeof (struct glyph_metrics)) == ((sizeof (int32_t)) * 3));
|
||||
|
||||
struct glyph_bitmap {
|
||||
uint16_t x;
|
||||
@ -19,14 +23,14 @@ struct glyph_bitmap {
|
||||
uint16_t height;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static_assert((sizeof (glyph_bitmap)) == ((sizeof (uint16_t)) * 4));
|
||||
static_assert((sizeof (struct glyph_bitmap)) == ((sizeof (uint16_t)) * 4));
|
||||
|
||||
struct glyph {
|
||||
glyph_bitmap bitmap;
|
||||
glyph_metrics metrics;
|
||||
struct glyph_bitmap bitmap;
|
||||
struct glyph_metrics metrics;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static_assert((sizeof (glyph)) == ((sizeof (glyph_bitmap)) + (sizeof (glyph_metrics))));
|
||||
static_assert((sizeof (struct glyph)) == ((sizeof (struct glyph_bitmap)) + (sizeof (struct glyph_metrics))));
|
||||
|
||||
struct font {
|
||||
uint32_t first_char_code;
|
||||
@ -42,4 +46,8 @@ struct font {
|
||||
uint32_t max_z_curve_ix;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static_assert((sizeof (font)) == ((sizeof (uint32_t)) * 7));
|
||||
static_assert((sizeof (struct font)) == ((sizeof (uint32_t)) * 7));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "holly/ta_parameter.hpp"
|
||||
|
||||
#include "font/font.hpp"
|
||||
#include "font/font.h"
|
||||
#include "gap_buffer.hpp"
|
||||
#include "viewport_window.hpp"
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "sh7091/serial.hpp"
|
||||
|
||||
#include "font/font.hpp"
|
||||
#include "font/font.h"
|
||||
|
||||
#include "ter_u20n.hpp"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <cstdint>
|
||||
|
||||
#include "holly/ta_parameter.hpp"
|
||||
#include "font/font.hpp"
|
||||
#include "font/font.h"
|
||||
|
||||
void transform_sprite(ta_parameter_writer& parameter,
|
||||
const float origin_x,
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
#include "../font/font.hpp"
|
||||
#include "../font/font.h"
|
||||
#include "rect.hpp"
|
||||
#include "ttf_2d_pack.hpp"
|
||||
#include "../twiddle.hpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user