Skip to content

Fix font weight retrieval - #8587

Closed
kshramt wants to merge 1 commit into
matplotlib:masterfrom
kshramt:fix-font-weight
Closed

kshramt wants to merge 1 commit into
matplotlib:masterfrom
kshramt:fix-font-weight

Conversation

@kshramt

@kshramt kshramt commented May 7, 2017

Copy link
Copy Markdown
Contributor

According to Name IDs section of https://www.microsoft.com/typography/otspec/name.htm

2 Font Subfamily name. The Font Subfamily name distiguishes the font in a group with the same Font Family name (name ID 1). This is assumed to address style (italic, oblique) and weight (light, bold, black, etc.). A font with no particular differences in weight or style (e.g. medium weight, not italic and fsSelection bit 6 set) should have the string “Regular” stored in this position.
4 Full font name; a combination of strings 1 and 2, or a similar human-readable variant. If string 2 is "Regular", it is sometimes omitted from name ID

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/whats_new.rst if major new feature
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@kshramt kshramt mentioned this pull request May 7, 2017
1 of 5 tasks
@kshramt kshramt changed the title Fix font weight parsing Fix font weight retrieval May 12, 2017
@kshramt
kshramt force-pushed the fix-font-weight branch from ae00070 to 3df29dd Compare May 12, 2017 12:18
@dstansby dstansby added this to the 2.1 (next point release) milestone May 12, 2017
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Aug 29, 2017

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct? AFAICT sfnt2/sfnt4 refer to the mac and windows tables, not the name ids.
Please provide an example where this fix would be necessary.

@QuLogic QuLogic added the status: needs clarification Issues that need more information to resolve. label Apr 1, 2020
@anntzer

anntzer commented May 28, 2020

Copy link
Copy Markdown
Contributor

Superseded by #16203; thanks for the pr.

@anntzer anntzer closed this May 28, 2020
@story645 story645 removed this from the future releases milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs clarification Issues that need more information to resolve. topic: text/fonts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants