scale = 1.0f / metrics.emSize; // metrics from getFontMetrics
float atlasScale = 1.0f / atlasPx; // atlasPx is the size of texture atlas
TextCharacterInformation info;
info.position.x = 0;
info.position.y = scale * bounds.b; // bounds from shape.getBounds
// info.position.y = 1.0f - (scale * bounds.t); // Activate if using Y is down or shape.inverseYAxis = true
info.size = scale * size;
info.textureIndex = hotTextureIndex; // the texture that still has free space
info.texturePosition = atlasScale * Vector2(xOffsetPx, yOffsetPx); // offsetPx is the carriage from atlas packing
info.textureSize = atlasScale * subbytesSize; // subbytesSize is the size of bitmap from generateMSDF
Some glyph like v and z are hovering above baseline.
Some glyph like v and z are hovering above baseline.