Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve output of dvi debug parsing.#29828

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jklymak merged 1 commit intomatplotlib:mainfromanntzer:dvitype
Mar 30, 2025
Merged

Conversation

anntzer
Copy link
Contributor

Again, mostly maintenance work in preparation for#29807.

To test, run e.g.

frompylabimport*set_loglevel("debug")figtext(.5,.5,r"gff\textwon$\frac12$",usetex=True)show()

Grab the path of the dvi file that appears last in the log, then run

python -mmatplotlib.dviread /path/to/dvi

Prior to this patch, the output was

=== new page === (w: 1668654, h: 553676, d: 225994)font: 'cmss10'scale: 0.625xyglyphchrw(glyphs)9830401441792103g3276811310721144179211.382295font: 'tcss1000'scale: 0.625xyglyphchrw(glyphs)16930161441792142.618800font: 'cmr7'scale: 0.4375xyglyphchrw(glyphs)2390459118375649126123523904591667786502261235xyhw(boxes)2390459129105826213261235

With this patch, the output is

=== NEW PAGE === (w: 1668654, h: 553676, d: 225994)--- GLYPHS ---font: cmss10 (scale: 0.625) at /usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb          x           y       glyph         chr           w     983040     1441792         103           g      327681    1310721     1441792          11           ff      382295font: tcss1000 (scale: 0.625) at /usr/local/texlive/2025/texmf-dist/fonts/type1/public/cm-super/sfss1000.pfb          x           y       glyph         chr           w    1693016     1441792         142           ₩      618800font: cmr7 (scale: 0.4375) at /usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb          x           y       glyph         chr           w    2390459     1183756          49           1      261235    2390459     1667786          50           2      261235--- BOXES ---          x           y           h           w    2390459     1291058       26213      261235

Most importantly, glyphs are now resolved to their unicode representation (essentially by resolving the glyph name, similarly to the process described in Text.glyph_name_or_index), whereas many complex glyphs were just output as "." before. Furthermore, full font paths are printed, and the output is slightly better aligned.

These improvements will be more significant with the future support for {xe,lua}tex, which can load a much wider variety of glyphs.

PR summary

PR checklist

To test, run e.g.```pythonfrom pylab import *set_loglevel("debug")figtext(.5, .5, r"gff\textwon$\frac12$", usetex=True)show()```Grab the path of the dvi file that appears last in the log, then run```bashpython -mmatplotlib.dviread /path/to/dvi```Prior to this patch, the output was```=== new page === (w: 1668654, h: 553676, d: 225994)font: 'cmss10'scale: 0.625xyglyphchrw(glyphs)9830401441792103g3276811310721144179211.382295font: 'tcss1000'scale: 0.625xyglyphchrw(glyphs)16930161441792142.618800font: 'cmr7'scale: 0.4375xyglyphchrw(glyphs)2390459118375649126123523904591667786502261235xyhw(boxes)2390459129105826213261235```With this patch, the output is```=== NEW PAGE === (w: 1668654, h: 553676, d: 225994)--- GLYPHS ---font: cmss10 (scale: 0.625) at /usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb          x           y       glyph         chr           w     983040     1441792         103           g      327681    1310721     1441792          11           ff      382295font: tcss1000 (scale: 0.625) at /usr/local/texlive/2025/texmf-dist/fonts/type1/public/cm-super/sfss1000.pfb          x           y       glyph         chr           w    1693016     1441792         142           ₩      618800font: cmr7 (scale: 0.4375) at /usr/local/texlive/2025/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb          x           y       glyph         chr           w    2390459     1183756          49           1      261235    2390459     1667786          50           2      261235--- BOXES ---          x           y           h           w    2390459     1291058       26213      261235```Most importantly, glyphs are now resolved to their unicoderepresentation (essentially by resolving the glyph name, similarly tothe process described in Text.glyph_name_or_index), whereas many complexglyphs were just output as "." before.  Furthermore, full font paths areprinted, and the output is slightly better aligned.These improvements will be more significant with the future support for{xe,lua}tex, which can load a much wider variety of glyphs.
@jklymakjklymak merged commitdc05767 intomatplotlib:mainMar 30, 2025
44 checks passed
@anntzeranntzer deleted the dvitype branchMarch 30, 2025 15:17
@QuLogicQuLogic added this to thev3.11.0 milestoneMar 31, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.11.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@timhoffm@QuLogic@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp