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

subset_fonts: make it possible to silence the stdout #1917

Closed
cbm755 opened this issue Sep 13, 2022 · 3 comments
Closed

subset_fonts: make it possible to silence the stdout #1917

cbm755 opened this issue Sep 13, 2022 · 3 comments
Assignees
Labels
enhancement resolved fixed / implemented / answered

Comments

@cbm755
Copy link
Contributor

cbm755 commented Sep 13, 2022

When I run doc.subset_fonts() I get the following on stdout/stderr (didn't check which):

Built subset of font 'Droid Sans Fallback Regular'.

Is it possible to suppress this output? Perhaps with a verbose=True keyword argument?

@JorjMcKie
Copy link
Collaborator

Ok, accepted. Shouldn't be a problem.

@JorjMcKie
Copy link
Collaborator

Will be implemented in next version.

julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Oct 13, 2022
…1913, pymupdf#1909

Changes to: jm_checkquad(), trace_lineto(), trace_close(), jm_trace_text_span().
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Oct 13, 2022
…1913, pymupdf#1909

Changes to: jm_checkquad(), trace_lineto(), trace_close(), jm_trace_text_span().
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Oct 18, 2022
…1913, pymupdf#1909

Pertain to 2 issues:

    False detection of rectangles, leading to too many triples of consecutive
    "line" commands being converted to "rect" items in the returned
    dictionary. We now only accept exactly 3 consecutive "line" commannds
    followed by "close path" to be a "rect candidate. This can no longer ever
    happen within function "jm_checkquad()".

    Calculating the font size in function "jm_trace_text_span" was incorrect
    and leading to wrong results if properties "a" and "d" of the text matrix
    (scaling factors in matrix "trm") are different.
    Changed to sqrt(a * d) - the geometric mean of the two.
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Oct 19, 2022
Changing the default value of "color" parameter from None to (0,) causes color
"black" if letting default it.

New verbose parameter in Document.subset_fonts() suppresses messages by default.
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Oct 19, 2022
Changing the default value of "color" parameter from None to (0,) causes color
"black" if letting default it.

New verbose parameter in Document.subset_fonts() suppresses messages by default.
julian-smith-artifex-com pushed a commit that referenced this issue Oct 19, 2022
Changing the default value of "color" parameter from None to (0,) causes color
"black" if letting default it.

New verbose parameter in Document.subset_fonts() suppresses messages by default.
@julian-smith-artifex-com julian-smith-artifex-com added resolved fixed / implemented / answered and removed Fixed in next release labels Nov 8, 2022
@julian-smith-artifex-com
Copy link
Collaborator

Fixed in 1.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement resolved fixed / implemented / answered
Projects
None yet
Development

No branches or pull requests

3 participants