GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix kerning of mathtext · matplotlib/matplotlib@387a3c1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/matplotlib
    • _mathtext.py
    • tests/baseline_images/test_mathtext
      • mathtext_cm_21.svg
      • mathtext_cm_23.png
      • mathtext_cm_23.svg
      • mathtext_dejavusans_21.svg
      • mathtext_dejavusans_23.png
      • mathtext_dejavusans_23.svg
      • mathtext_dejavusans_27.svg
      • mathtext_dejavusans_46.svg
      • mathtext_dejavusans_49.svg
      • mathtext_dejavusans_60.svg
      • mathtext_dejavuserif_21.svg
      • mathtext_dejavuserif_23.png
      • mathtext_dejavuserif_23.svg
      • mathtext_dejavuserif_60.svg
      • mathtext_stix_21.svg
      • mathtext_stix_23.png
      • mathtext_stix_23.svg
      • mathtext_stixsans_21.svg
      • mathtext_stixsans_23.png
      • mathtext_stixsans_23.svg
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/matplotlib/_mathtext.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/_mathtext.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ def get_kern(self, font1: str, fontclass1: str, sym1: str, fontsize1: float,
426426
info1 = self._get_info(font1, fontclass1, sym1, fontsize1, dpi)
427427
info2 = self._get_info(font2, fontclass2, sym2, fontsize2, dpi)
428428
font = info1.font
429-
return font.get_kerning(info1.num, info2.num, Kerning.DEFAULT) / 64
429+
return font.get_kerning(font.get_char_index(info1.num),
430+
font.get_char_index(info2.num),
431+
Kerning.DEFAULT) / 64
430432
return super().get_kern(font1, fontclass1, sym1, fontsize1,
431433
font2, fontclass2, sym2, fontsize2, dpi)
432434

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.