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

Font overview #1849

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Font overview #1849

wants to merge 4 commits into from

Conversation

ollimeier
Copy link
Collaborator

@ollimeier ollimeier commented Dec 11, 2024

Fixes #102

This is a draft PR for getting early feedback.

@ollimeier ollimeier force-pushed the issue-102-font-overview branch from cf8c6cd to b815bb7 Compare December 11, 2024 04:46
@ollimeier
Copy link
Collaborator Author

@justvanrossum

TODOs and Questions:

  1. I am wondering if it would make sense to refactor GlyphsSearch into two web components:
    1. GlyphsSearch: Includes the search field, only. Access the list of glyphs with eg. glyphsListItemsController.
    2. GlyphsSearchForEditor which uses GlyphsSearch and adds the glyph list.
  2. We may want to move sortedSourceIdentifiers to a more general location like utils. Follow up task?
  3. Do we want to make the sidebar scalable? If so, we may want to refactor sidebar-resize-gutter or at least have a look at it. Follow up task?
  4. Context menu is implemented in the overview, yet. We may want to add them. Is this a follow up task?
  5. Maybe use https://www.npmjs.com/package/unicode-properties for overview sections. Also, how to we handle unencoded glyphs? Follow up task?
  6. Add top menu bar, please see: Menu bar for font overview #1845
  7. When opening a glyph in the editor via double click, there is an error: It says error while interpolating font sources '{message: 'objects have incompatible number of entries: 7 != 6', type: 'interpolation-error'}'. But this is not true. I don't know why this is happening.

@ollimeier
Copy link
Collaborator Author

Little demo of the current stage:

fontra-font-overview-sneak-preview.mp4

@justvanrossum
Copy link
Collaborator

Next steps:

  • Figure out "cell view" API,
    • getSelectedGlyphNames()
    • setSelectedGlyphNames()
    • addEventListener("selectionChanged", (event) => ...)
  • Selection behavior:
    • Click to select glyph
    • Shift click to deselect glyph, or add glyph to selection
    • Click-drag, to "paint" selection? Can be followup.
    • Arrow key navigation. Can be followup.
    • Typing a character (and glyphname?) selects the matching glyph. Can be followup.
  • Fix cell layout so cells "flow" ("inline block"), see "Related Glyphs" panel
  • Fix cell glyph load/draw so it only loads once the cell becomes visible (currently it seems all glyphs are loaded, also the ones outside the scroll area)

Question:

  • Should the cell view be an accordion view, so sections can be folded/hidden?

@justvanrossum
Copy link
Collaborator

Minor bug: double clicking the / glyph results in an empty canvas. Since it is the prefix for glyph names, if you want to type a slash, it should be doubled. So I think we should special-case the / to become // in the text entry.

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.

Font Overview view(s)
2 participants