27 lines
591 B
C
27 lines
591 B
C
|
#pragma once
|
||
|
|
||
|
#include "ofMain.h"
|
||
|
#include <msdf-atlas-gen/msdf-atlas-gen.h>
|
||
|
#include "conversion.h"
|
||
|
|
||
|
namespace ofxMsdfgen {
|
||
|
struct AtlasSettings {
|
||
|
float maxCornerAngle = 3.0;
|
||
|
float minimumScale = 24.0;
|
||
|
float pixelRange = 2.0;
|
||
|
float miterLimit = 1.0;
|
||
|
int threadCount = 4;
|
||
|
};
|
||
|
class Atlas {
|
||
|
public:
|
||
|
void setup(string _fontPath);
|
||
|
void setup(string _fontPath, AtlasSettings _settings);
|
||
|
bool generate();
|
||
|
const ofImage & getAtlasImage();
|
||
|
AtlasSettings settings;
|
||
|
private:
|
||
|
string fontPath;
|
||
|
ofImage atlasImage;
|
||
|
};
|
||
|
}
|