Message361729
In LibreOffice, I see 4 flavors of "Cantarell" with different *weight* :
Cantarell
Cantarell Extra Bold
Cantarell Light
Cantarell Thin
whereas tkinter.font.families(frame) returns 4 times the same string: "Cantarell". The C function of Tk is TkpGetFontFamilies().
The X11 implementation uses XListFonts() which returns a string like "-foundry-family-weight-slant-(...)" but the function only returns the "family" substring: it ignores the foundy and the weight for example. So it's not surprising to get duplicates. Example: "-adobe-helvetica-bold-o-normal--11-80-100-100-p-60-iso8859-1" becomes "helvetica".
There is also a Xft implementation which uses XftListFonts(). Then it uses XftPatternGetString() to get a font family.
I see no logic in Tcl to exclude duplicated family names of different weights.
--
>>> tkinter.font.names(frame)
('TkCaptionFont', 'TkSmallCaptionFont', 'TkTooltipFont', 'TkFixedFont', 'TkHeadingFont', 'TkMenuFont', 'TkIconFont', 'TkTextFont', 'TkDefaultFont')
That's something different that I would call unrelated ;-) |
|
Date |
User |
Action |
Args |
2020-02-10 21:49:10 | vstinner | set | recipients:
+ vstinner, terry.reedy, taleinat, serhiy.storchaka, cheryl.sabella, miss-islington |
2020-02-10 21:49:10 | vstinner | set | messageid: <1581371350.23.0.981420346836.issue39600@roundup.psfhosted.org> |
2020-02-10 21:49:10 | vstinner | link | issue39600 messages |
2020-02-10 21:49:10 | vstinner | create | |
|