add lineHeight

This commit is contained in:
jrkb 2023-05-03 14:58:16 +02:00
parent dfe0f4872b
commit e1746e5ab6
2 changed files with 3 additions and 1 deletions

View file

@ -208,7 +208,8 @@ void GPUFontAtlasLayerCombo::draw(int width, int height){
font->collectBoundingBoxes(layer->getVariationText(),
layer->getVariationTextAppearance(),
bb, bbs, advanceY,
true, layer->getProps().fontSize_px);
true, layer->getProps().fontSize_px,
layer->getProps().lineHeight);
glm::vec4 transformOrigin;
getAndApplyTransformOrigin(transformOrigin,
layer->getOuterNode(),

View file

@ -32,6 +32,7 @@ class Layer {
float rotation = 0;
float fontSize_px = 42;
float letterSpacing = 0;
float lineHeight = 1;
std::array <float, 4> color = {0, 0, 0, 1};
bool mirror_x = false;
float mirror_x_distance = 0;