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

Scale multi-width unicodes #817

Merged
merged 4 commits into from
Feb 14, 2023
Merged

Conversation

alixander
Copy link
Collaborator

@alixander alixander commented Feb 14, 2023

screencapture-file-Users-alexanderwang-dev-alixander-d2-e2etests-out-e2e-report-html-2023-02-14-10_15_07

closes #813
closes #513
closes #749
probably missing like 5 other issues @bo-ku-ra 's opened ;)

@alixander alixander mentioned this pull request Feb 14, 2023
@bo-ku-ra
Copy link
Contributor

bo-ku-ra commented Feb 14, 2023

awesome!

Emoji ZWJ Sequence / U+200D ZERO WIDTH JOINER (ZWJ)
https://emojipedia.org/emoji-zwj-sequence/

especially
Family: Woman, Woman, Girl, Baby is wide.

@bo-ku-ra
Copy link
Contributor

i think the test would require a mixed text of double-byte charactors, single-byte charactors, and emojis, too.

@bo-ku-ra
Copy link
Contributor

bo-ku-ra commented Feb 14, 2023

{style.stroke-width: 15; style.double-border: true} <- there are renderings inside.

  • width 15:max + double-border(v 0.2.0)

https://play.d2lang.com/?l=&script=etzY9bip5XHjzMeN-x83rnrcOPVxY0s12GA9ZPusFAxNrRUg4ihRYaVQUlSaWqvABQgAAP__&

@alixander
Copy link
Collaborator Author

@bo-ku-ra updated with your tests. the method is not 100% accurate, it gives it a little too wide, but I think by an acceptable amount. What do you think

@alixander alixander requested a review from nhooyr February 14, 2023 18:17
@alixander
Copy link
Collaborator Author

alixander commented Feb 14, 2023

@nhooyr tagged you to just take a glance in case anything raises a flag to you, no need to dig into

@alixander alixander requested a review from gavin-ts February 14, 2023 18:43
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bo-ku-ra
Copy link
Contributor

@alixander
d2 v0.2.0 was designed with a shorter vertical length, but it looks good.
( maybe the whole diagram looks squashed? )

@alixander alixander merged commit 53dce56 into terrastruct:master Feb 14, 2023
@bo-ku-ra
Copy link
Contributor

fyi
https://en.wikipedia.org/wiki/Golden_ratio
https://en.wikipedia.org/wiki/Silver_ratio (<- japanese like it. mickey mouse, doraemon, google logo, etc.)

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