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

SVG fonts affect subsequent text #494

Closed
kastork opened this issue Aug 5, 2016 · 5 comments
Closed

SVG fonts affect subsequent text #494

kastork opened this issue Aug 5, 2016 · 5 comments
Assignees

Comments

@kastork
Copy link

kastork commented Aug 5, 2016

asciidoctor-pdf -v
Asciidoctor PDF 1.5.0.alpha.12 using Asciidoctor 1.5.4 [http://asciidoctor.org]
Runtime Environment (ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

It is possible this is a prawn bug...

Using default themes and styles, font use following an SVG image matches the SVG rather than the document's style.

Example attached.

The file suffix is .txt due to github not accepting .adoc, but this is an asciidoc file.

svg_font_reproducer.txt

svg_font_reproducer.pdf

@mojavelinux
Copy link
Member

Prawn SVG is only supposed to be setting the font within the block that draws the graphic object sourced from the SVG. It appears this setting is lingering. We'll have to see if this is the responsibility of Prawn SVG (which I think it is) or whether we need to revert the font settings ourselves after calling Prawn SVG.

@mojavelinux mojavelinux added the bug label Aug 5, 2016
@mojavelinux mojavelinux added this to the v1.5.0.alpha.13 milestone Aug 5, 2016
@mojavelinux mojavelinux self-assigned this Aug 5, 2016
@mojavelinux
Copy link
Member

Thanks for reporting, @kastork!

@mojavelinux
Copy link
Member

Here's a link to the upstream issue: mogest/prawn-svg#80

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Aug 6, 2016
@mojavelinux
Copy link
Member

I can apply a workaround that will isolate the font settings that get applied by prawn-svg.

@mojavelinux
Copy link
Member

The workaround is in place. A fix upstream in Prawn SVG will merely be redundant as far as Asciidoctor PDF is concerned, though that fix still should be made.

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 5, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 5, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 6, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 6, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 6, 2016
mojavelinux added a commit that referenced this issue Sep 6, 2016
… (PR #541)

* allow image type to be specified using format attribute
* use the term "format" instead of "type" to refer to image format
* resolves #494 prevent inline SVG from changing document font
fapdash pushed a commit to vogellacompany/asciidoctor-pdf that referenced this issue Dec 13, 2016
fapdash pushed a commit to vogellacompany/asciidoctor-pdf that referenced this issue Dec 13, 2016
…t attribute (PR asciidoctor#541)

* allow image type to be specified using format attribute
* use the term "format" instead of "type" to refer to image format
* resolves asciidoctor#494 prevent inline SVG from changing document font
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants