Skip to content

Support unicode chars in annotations #20356

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

Draft
wants to merge 28 commits into
base: develop
Choose a base branch
from

Conversation

markcmiller86
Copy link
Member

Description

Resolves #20350

Type of change

  • [ ] Bug fix
  • New feature~~
  • [ ] Documentation update
  • [ ] Other

How Has This Been Tested?

Reminders:

  • Please follow the style guidelines of this project.
  • Please perform a self-review of your code before submitting a PR and asking others to review it.
  • Please assign reviewers (see VisIt's PR procedures for more information).

Checklist:

  • I have commented my code where applicable.~~
  • I have updated the release notes.~~
  • I have made corresponding changes to the documentation.~~
  • I have added debugging support to my changes.~~
  • I have added tests that prove my fix is effective or that my feature works.~~
  • I have confirmed new and existing unit tests pass locally with my changes.~~
  • I have added new baselines for any new tests to the repo.~~
  • I have NOT made any changes to protocol or public interfaces in an RC branch.~~

@markcmiller86
Copy link
Member Author

@biagas and/or @JustinPrivitera if you can take a brief look and lemme know what you think so far, that would be great. I am deciding what to do about 3D axes because they have a lot of custom coding.

std::string fontFile = GetVisItResourcesDirectory(VISIT_RESOURCES_FONTS) +
VISIT_SLASH_STRING;

// Treat Arial as the "Regular" form of DejaVuSans
Copy link
Member

Choose a reason for hiding this comment

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

Can you elaborate on what these comments mean? What is the regular/mono/serif form of DejaVu and why are they mapped to Arial, Courier, and Times?

Copy link
Member Author

Choose a reason for hiding this comment

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

These are different styles (behaviors) of fonts. Arial is a sans-serif (e.g. no serifs) font. Times is a serif font. Neither Arial or Times are "monospaced" (meaning columnar in that every character takes up the same space) like Courier which is often desired for displaying lines of code. My strong belief is that Arial, Times and Courier were used in VTK (long ago and still in our interface today) as recognizeable synonyms for those key font attributes.

Copy link
Member

Choose a reason for hiding this comment

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

It just seems odd to me to have synonyms instead of the real thing.

Copy link
Member Author

Choose a reason for hiding this comment

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

You asked what "regular/mono/serif" are. Does that suggest you are not as familiar with that font-speak? If so, don't fret. Most people don't. But, most people do know what Arial (or Helvetica), Times and Courier font faces are. I think that made sense for VTK way back when and I think it still probably makes sense in our GUI. Though, I could probably easily be convinced otherwise.

Copy link
Member

Choose a reason for hiding this comment

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

Does that suggest you are not as familiar with that font-speak?

That's right. Thanks for explaining! I don't have a strong opinion here.

@JustinPrivitera
Copy link
Member

Sorry, I misclicked and merged develop into this branch. Hope that's ok.

@markcmiller86
Copy link
Member Author

Ok, I finally have a viable path for unicode in the axes titles...

Screen.Recording.2025-05-06.at.4.51.03.PM.mov

@markcmiller86
Copy link
Member Author

Unicode characters in file path names...

Current VisIt

Screenshot 2025-05-07 at 6 36 23 PM

This Pull Request

Screenshot 2025-05-07 at 6 37 33 PM

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.

Package Unicode fonts (DejaVuSans.ttf or NotoSans.ttf) with VisIt and use by default
3 participants