Skip to content

bold or underline in the middle of text #525

@agus24

Description

@agus24

Is your feature request related to a problem? Please describe.
i want to create this
Image
but the way i do is like this for all the numbered list

	addDetailRows := func(label, value string) {
		m.AddRow(6,
			col.New(1).Add(
				text.New(label, props.Text{Size: 11, Align: align.Right}),
			),
			col.New(11).Add(
				text.New(value, props.Text{Size: 11, Align: align.Left}),
			),
		)
	}

but the number 5 is special so i do some workaround so it become like this

	m.AddRow(6,
		col.New(1).Add(text.New("5. ", props.Text{Size: 11, Align: align.Right})),
		col.New(12).Add(
			text.New("Apabila ada perbedaan karat yang lebih rendah setelah pemotongan maka", props.Text{Size: 11, Align: align.Left, Left: 0}),
			text.New("akan diambil", props.Text{Size: 11, Align: align.Left, Style: fontstyle.BoldItalic + fontstyle.Underline, Top: 0, Left: 130}),
			text.New("dari nilai karat tersebut", props.Text{Size: 11, Align: align.Left, Style: fontstyle.BoldItalic + fontstyle.Underline, Top: 4, Left: 0}),
			text.New("& apabila setelah pemotongan terdapat logam lain selain emas", props.Text{Size: 11, Align: align.Left, Left: 44, Top: 4}),
			text.New("maka proses transaksi", props.Text{Size: 11, Align: align.Left, Left: 0, Top: 8}),
			text.New("tidak dapat dilanjut / ditolak.", props.Text{Size: 11, Align: align.Left, Style: fontstyle.BoldItalic + fontstyle.Underline, Top: 8, Left: 40}),
		),
	)

as you can see im separating the text so i can make it bolditalic + underline. its working like this but i need to specify top and left of the text to make it looks like the expected file.

Describe the solution you'd like
is there a way to make this join text with something like Inline: true for column so it can join those text together without the configuration of top and left?

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions