Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to change not only color but font face when writing to a single text object #271

Open
3ter opened this issue Dec 15, 2020 · 0 comments

Comments

@3ter
Copy link

3ter commented Dec 15, 2020

As shown in the example it's possible to write to the same text object with different colors.

basicTxt.Color = colornames.Red
fmt.Fprintln(basicTxt, "Hello, text!")

basicTxt.Color = colornames.Green
fmt.Fprintln(basicTxt, "I support multiple lines!")

basicTxt.Color = colornames.Blue
fmt.Fprintf(basicTxt, "And I'm an %s, yay!", "io.Writer")

Could the same be done with the font face to change the size or font-weigth?

The workaround for me is to create separate text objects (which is a little bit more effort in terms of aligning those letters properly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants