Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot turn bold off #162

Closed
ninja- opened this issue Dec 25, 2014 · 4 comments · Fixed by #202
Closed

Cannot turn bold off #162

ninja- opened this issue Dec 25, 2014 · 4 comments · Fixed by #202

Comments

@ninja-
Copy link

ninja- commented Dec 25, 2014

There seems to be a bug.
I can't turn bold back off after using it once.

Example doc:

docDefinition = {
    content: [
        [{ 
            text: 'hello1', 
            alignment: 'center', fontSize: 14, bold: true
        }],
        { 
            text: "hello2", 
            alignment: 'center', fontSize: 12, bold: false
        }, 'asasdd',
]}

In that case both are rendered bold. If I set bold to false in first one, none of them are bold.

EDIT: problem can be fixed by downgrading pdfmake by a lot. I'll try to find the commit that causes the problem

@ninja-
Copy link
Author

ninja- commented Dec 25, 2014

Regression caused by 92dac13 when looking @ build/pdfmake.js.

Works fine @ 199bb47

ISSUE FOUND:
The problem is fixed by reverting cf40006

@SteffiPeTaffy
Copy link
Contributor

The same behaviour with the italics property.

@giangdm
Copy link

giangdm commented Jan 20, 2015

I founded the problem in debug file line 15156
change from:

cacheKey = family || src;

to:
cacheKey = src || family;

@jthoenes
Copy link
Contributor

Thanks @giangdm - helped me track it down. The pull request should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants