Skip to content

DOC: Add thumbnail for font_indexing gallery example#31502

Open
gulatikrishav wants to merge 2 commits intomatplotlib:mainfrom
gulatikrishav:doc/add-thumbnail-multipage-pdf
Open

DOC: Add thumbnail for font_indexing gallery example#31502
gulatikrishav wants to merge 2 commits intomatplotlib:mainfrom
gulatikrishav:doc/add-thumbnail-multipage-pdf

Conversation

@gulatikrishav
Copy link
Copy Markdown

@gulatikrishav gulatikrishav commented Apr 15, 2026

The font_indexing example was missing a thumbnail in the gallery
because it produces no plot output — it only prints font metrics
to stdout.

A custom SVG thumbnail showing a sample of DejaVuSans glyphs has
been created and added to doc/_static/font_indexing_thumbnail.svg.
The sphinx_gallery_thumbnail_path directive has been added to the
example file to point to this image.

Closes #17479

font_indexing thumbnail

I used Claude (Anthropic) to help guide me through the contribution
process as a first-time contributor.

@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Apr 15, 2026
@story645
Copy link
Copy Markdown
Member

story645 commented Apr 15, 2026

Thanak! Can you please paste the proposed image into the PR summary?

@gulatikrishav
Copy link
Copy Markdown
Author

gulatikrishav commented Apr 15, 2026

Thanak! Can you please paste the proposed image into the PR summary?
Done! I've added the thumbnail image to the PR description.

@gulatikrishav gulatikrishav reopened this Apr 15, 2026
@gulatikrishav
Copy link
Copy Markdown
Author

Done! I've added the thumbnail image to the PR description.

@story645
Copy link
Copy Markdown
Member

story645 commented Apr 15, 2026

What's that figure supposed to illustrate about font indexing?

@gulatikrishav
Copy link
Copy Markdown
Author

The current thumbnail shows a sample of DejaVuSans glyphs (A-C, a-c, 0-2) as a visual stand-in since the example produces no plot output. I can revise it to better illustrate the font indexing concept — perhaps showing glyph indices alongside characters, or a kerning pair visualization. What would you suggest?

@story645
Copy link
Copy Markdown
Member

— perhaps showing glyph indices alongside characters, or a kerning pair visualization. What would you suggest?

What do you mean by that?

@gulatikrishav
Copy link
Copy Markdown
Author

By 'glyph indices alongside characters' I meant something like this:
A → 36, V → 57, T → 58
Essentially, each character paired with its index number in the font table, since that's what the example computes.

By 'kerning pair visualization' I meant showing two characters like AV with the distance between them labeled, since the example also computes how much the font tightens or loosens spacing between specific letter pairs.

Would that work as a thumbnail?

@gulatikrishav
Copy link
Copy Markdown
Author

Hey, just wanted to follow up. Let me know what you think!

@story645
Copy link
Copy Markdown
Member

I'm not exactly following your proposal so can you please make a mock up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: examples files in galleries/examples

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

Add thumbnails for tutorials/gallery where missing

3 participants