Rename (and refactor) TextLayout, update GlyphMetrics

This commit is contained in:
Joshua Granick
2015-03-14 23:50:15 -07:00
parent 19ace78c33
commit 74592ed5bd
14 changed files with 415 additions and 293 deletions

View File

@@ -0,0 +1,49 @@
#ifndef LIME_TEXT_TEXT_LAYOUT_H
#define LIME_TEXT_TEXT_LAYOUT_H
#include <text/Font.h>
#include <utils/ByteArray.h>
namespace lime {
typedef struct {
uint32_t index;
float advanceX;
float advanceY;
float offsetX;
float offsetY;
} GlyphPosition;
class TextLayout {
public:
TextLayout (int direction, const char *script, const char *language);
~TextLayout ();
void Position (Font *font, size_t size, const char *text, ByteArray *bytes);
void SetDirection (int direction);
void SetLanguage (const char* language);
void SetScript (const char* script);
private:
void *mBuffer;
long mDirection;
long mScript;
long mLanguage;
};
}
#endif