Skip to content

Replace <span> with <font> to avoid reseting font-family #21

@msaraiva

Description

@msaraiva

When converting the generated HTML to EPUB, the font-family information is lost. Here's an example from the Ecto documentation:

image

The font for <code> should be monospaced in both cases but it only works for the html version on the left.

I've tried to set the font-family for the <span> nodes in makeup.less and even tried to set it inline using style. It worked for things like color and font-size but not for the font-family. Maybe somebody with better css skills might figure out a way to do that.

Apparently, using <font> instead of <span> here fixes the issue without messing with the html version:

image

Now, with <font>, the epub version uses the monospaced font as expected:

image

In case there's no other solution and you think this should be addressed this way, let me know. I'll be glad to create a PR.

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions