#pragma once

//#include "GlyphBox.h"
//#include "glyph-generators.h"
#include "ofMain.h"
//#include "BitmapAtlasStorage.h"
//#include "GlyphGeometry.h"
#include <msdf-atlas-gen/msdf-atlas-gen.h>

#define F26DOT6_TO_DOUBLE(x) (1 / 64. * double(x))
#define F16DOT16_TO_DOUBLE(x) (1 / 65536. * double(x))
#define DOUBLE_TO_F16DOT16(x) FT_Fixed(65536. * x)
#define F26DOT6_TO_FLOAT(x) (1.0f / 64.f * float(x))
#define F16DOT16_TO_FLOAT(x) (1.0f / 65536.f * float(x))
#define FLOAT_TO_F16DOT16(x) FT_Fixed(65536.f * x)

namespace ofxMsdfgen {
using GlyphBox = msdf_atlas::GlyphBox;
using GlyphGeometry = msdf_atlas::GlyphGeometry;
using FontGeometry = msdf_atlas::FontGeometry;

void toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
               ofFloatImage & image);
void toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
               ofImage & image);
void toOfImage(const msdfgen::Bitmap <byte, 3> bitmap,
               ofImage & image);
ofImage toOfImage(const msdfgen::Bitmap <float, 3>);
}
