Skip to content

Support unicode chars in annotations#20356

Draft
markcmiller86 wants to merge 28 commits intodevelopfrom
feat-mcm86-10apr25-unicode-fonts
Draft

Support unicode chars in annotations#20356
markcmiller86 wants to merge 28 commits intodevelopfrom
feat-mcm86-10apr25-unicode-fonts

Conversation

@markcmiller86
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/visit_vtk/lightweight/vtkVisItUtility.C Outdated
Comment thread src/visit_vtk/lightweight/vtkVisItUtility.C Outdated
std::string fontFile = GetVisItResourcesDirectory(VISIT_RESOURCES_FONTS) +
VISIT_SLASH_STRING;

// Treat Arial as the "Regular" form of DejaVuSans
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/avt/VisWindow/Colleagues/VisWinParallelAxes.C
markcmiller86 and others added 3 commits April 14, 2025 09:27
Co-authored-by: Justin Privitera <35237779+JustinPrivitera@users.noreply.github.com>
Co-authored-by: Justin Privitera <35237779+JustinPrivitera@users.noreply.github.com>
@JustinPrivitera
Copy link
Copy Markdown
Member

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

@markcmiller86
Copy link
Copy Markdown
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
Copy Markdown
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

@marcdurant
Copy link
Copy Markdown
Contributor

Hi @markcmiller86 !
What's the status of this feature? Some of our folks are quite interested in it.
Thanks!

@markcmiller86
Copy link
Copy Markdown
Member Author

@marcdurant apologies that I have let this languish. I worked through a lot of issues but only for 2D annotations. When I went to tackle 3D annotations, I ran into a number of snags that I was working through. The relevant VTK 9.5 objects were not working with VisIt's rendering modality and never actually appearing in a VisIt window. Though, the very same objects in a stand-alone VTK app worked fine. In addition, I've only recently re-activated the mac development platform that I was originally doing this work on and my attentions have been on getting a solid, new release of Silo out. I expect to be able to return to this in another month, maybe a tad sooner.

@marcdurant
Copy link
Copy Markdown
Contributor

@markcmiller86 Thanks for the update. Our specific use case is using Expressions to create new Curve variables, and we'd like to be able to label the plot in a way that more cleanly expresses the underlying Expression.

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

4 participants