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

No way to specify text colors, sizes, etc. #70

Open
cwervo opened this issue Aug 24, 2023 · 0 comments
Open

No way to specify text colors, sizes, etc. #70

cwervo opened this issue Aug 24, 2023 · 0 comments
Assignees

Comments

@cwervo
Copy link
Collaborator

cwervo commented Aug 24, 2023

In the Discord @zspotter suggested something like:

Display::text $x $y $angle {
  One fish, two fish, [bg red] red fish, [bg blue fg yellow] blue fish
}

I like this idea of an inline DSL for transforming sections of text ... could even do:


[fsize 10] bigger text

bigger text



[bg red fg green]
Screenshot 2023-08-24 at 5 37 39 PM

(apologies for the garish colors, it's just to demonstrate the point)


It's worth asking the question: how useful is making our own DSL versus adopting HTML parsing? e.g. for the above:

  • <h1>bigger text</h1>
    • <span style="color: red; background-color: green">green text</span> OR <span class="fgGreen bgRed">green text</span>

The obvious answer is: the web is document based + has a lot of baggage & even comparing the previous examples with the pseudo-HTML examples, I notice the pHTML examples take a lot more text to write how. Hmmmm, will keep thinking, feel free to comment with alternative ideas or extensions to this little DSL!

@cwervo cwervo assigned cwervo and unassigned cwervo Aug 24, 2023
@cwervo cwervo self-assigned this Jul 16, 2024
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