Skip to content

Conversation

@mariovisic
Copy link
Contributor

When creating a text object you can now set the style attribute to be
either: 'bold', 'italic', 'underline' or 'strikethrough', any other
value results in regular font styling.

When creating a text object you can now set the style attribute to be
either: 'bold', 'italic', 'underline' or 'strikethrough', any other
value results in regular font styling.
@mariovisic
Copy link
Contributor Author

Testing with this program:

require 'ruby2d'

Text.new('regular', y: 0)
Text.new('bold', style: :bold, y: 100)
Text.new('italic', style: :italic, y: 200)
Text.new('underline', style: :underline, y: 300)
Text.new('strikethrough', style: :strikethrough, y: 400)

show

Output:

Screen Shot 2021-08-17 at 8 25 43 pm

@mariovisic mariovisic requested a review from blacktm August 17, 2021 10:29
@mariovisic
Copy link
Contributor Author

Will need to update the website to add this new attribute once this PR is merged!

@mariovisic mariovisic merged commit 65f5712 into main Aug 22, 2021
@mariovisic mariovisic deleted the font_styles branch August 22, 2021 10:01
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

Successfully merging this pull request may close these issues.

3 participants