remove unnecessary gpuTextureOffset
This commit is contained in:
parent
d89034e540
commit
45240df10c
1 changed files with 5 additions and 12 deletions
|
@ -429,11 +429,10 @@ class Font {
|
|||
|
||||
// If hinting is enabled, worldSize must be an integer and defines the font size in pixels used for hinting.
|
||||
// Otherwise, worldSize can be an arbitrary floating-point value.
|
||||
Font(FT_Face face, int gpuTextureOffset, float worldSize = 1.0f, bool hinting = false) :
|
||||
Font(FT_Face face, float worldSize = 1.0f, bool hinting = false) :
|
||||
face(face),
|
||||
hinting(hinting),
|
||||
worldSize(worldSize),
|
||||
gpuTextureOffset(gpuTextureOffset){
|
||||
worldSize(worldSize){
|
||||
// TODO: modularize init, so we can initialize with settings and text
|
||||
|
||||
|
||||
|
@ -743,9 +742,6 @@ class Font {
|
|||
bool initializedGlyphsBufferTexture = false;
|
||||
bool initializedCurvesBufferTexture = false;
|
||||
bool dirtyBuffers = false;
|
||||
int calcTextureOffset(){
|
||||
return gpuTextureOffset * 2;
|
||||
}
|
||||
void testGL(GLuint texture = 10){
|
||||
//int size = 0;
|
||||
//glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
|
||||
|
@ -1443,12 +1439,10 @@ class Font {
|
|||
// The glyph quads are expanded by this amount to enable proper
|
||||
// anti-aliasing. Value is relative to emSize.
|
||||
float dilation = 0;
|
||||
int gpuTextureOffset = 0;
|
||||
};
|
||||
|
||||
static std::shared_ptr <Font> loadFont(FT_Library & library,
|
||||
const std::string & filename,
|
||||
int gpuTextureOffset = 0,
|
||||
float worldSize = 1.0f,
|
||||
bool hinting = false){
|
||||
std::string error;
|
||||
|
@ -1460,16 +1454,15 @@ static std::shared_ptr <Font> loadFont(FT_Library & library,
|
|||
std::cout << "ofxGPUFont::font.hpp[" << __LINE__ << "] FT loaded " << filename << ": " << error << std::endl;
|
||||
}
|
||||
|
||||
return std::make_shared <Font>(face, gpuTextureOffset, worldSize, hinting);
|
||||
return std::make_shared <Font>(face, worldSize, hinting);
|
||||
}
|
||||
|
||||
|
||||
static void initializeFont(FT_Library & library,
|
||||
const std::string & filename,
|
||||
shared_ptr <Font> & mainFont,
|
||||
int gpuTextureOffset){
|
||||
shared_ptr <Font> & mainFont){
|
||||
cout << "initializeFont" << endl;
|
||||
auto font = loadFont(library, filename, gpuTextureOffset);
|
||||
auto font = loadFont(library, filename);
|
||||
if(!font){
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue