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 #45

Open
duysqubix opened this issue Oct 10, 2023 · 0 comments

Comments

@duysqubix
Copy link
Contributor

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).

Original issue: faiface/pixel#271

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

No branches or pull requests

1 participant