Skip to content

Chinese font can`t change the weight #15529

@Slime0

Description

@Slime0

Bug report

Bug summary
I found that when I use Chinese font, I can`t set the weight. When I change the value of weight, It does not work.

Code for reproduction

When I try this

weights = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black']
axis('off')
for i in enumerate(weights):
    num,weight=i
    text(0.5,0.2*num,u'ABC',fontdict={
        'family':'KaiTi',
        'weight':weight,
        'size':30
    })
    text(0,0.2*num,u'哈哈哈',fontdict={
        'family':'KaiTi',
        'weight':weight,
        'size':30
    })
show()

The results show it dose not work.

image

And when I comment out this line of code

weights = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black']
axis('off')
for i in enumerate(weights):
    num,weight=i
    text(0.5,0.2*num,u'ABC',fontdict={
        # 'family':'KaiTi',
        'weight':weight,
        'size':30
    })
    text(0,0.2*num,u'哈哈哈',fontdict={
        # 'family':'KaiTi',
        'weight':weight,
        'size':30
    })
show()

.........:(
image

I guess maybe it doesn't support Chinese bold. :(

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions