in packages/core/src/rendering/render-text.ts [12:52]
get paragraph() {
if (this._paragraph) {
return this._paragraph
}
const builder = new ParagraphBuilder()
builder.addText(this._text)
if (this.style.has('fontStyle')) {
builder.style.fontStyle = this.style.fontStyle
}
if (this.style.has('fontVariant')) {
builder.style.fontVariant = this.style.fontVariant
}
if (this.style.has('fontWeight')) {
builder.style.fontWeight = this.style.fontWeight
}
if (this.style.has('fontStretch')) {
builder.style.fontStretch = this.style.fontStretch
}
if (this.style.has('fontSize')) {
builder.style.fontSize = this.style.fontSize
}
if (this.style.has('lineHeight')) {
builder.style.lineHeight = this.style.lineHeight
}
if (this.style.has('fontFamily')) {
builder.style.fontFamily = this.style.fontFamily
}
if (this.style.has('font')) {
builder.style.font = this.style.font
}
if (this.style.has('color')) {
builder.style.color = this.style.color
}
if (this.style.has('maxLines')) {
builder.style.maxLines = this.style.maxLines
}
if (this.style.has('textAlign')) {
builder.style.textAlign = this.style.textAlign
}
return this._paragraph = builder.build()
}