Skip to content

Rendering external woff2 fonts #156

@hsb-tonmoy

Description

@hsb-tonmoy

I'm trying to use Google fonts using the EFont component:

<EHead>
      <EFont
        font-family="Manrope"
        fallback-font-family="Arial"
        :web-font="{
          url: 'https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap',
          format: 'woff2',
        }"
        font-weight="400"
        font-style="normal"
      />
</EHead>

The rendered output looks like this:

<style>
      @font-face {
        font-family: &quot;
        Manrope&quot;
        ;
        font-style: normal;
        font-weight: 400;
        mso-font-alt: &quot;
        Arial&quot;
        ;
        src: url(https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&amp;display=swap) format(&quot; woff2&quot; );
      }

      * {
        font-family: &quot;
        Manrope&quot;
        ,
        Arial;
      }
</style>

I'm not sure where the " are coming from and referencing the font-family as such font-family:Manrope, Arial, sans-serif; throughout the template doesn't really work. It always falls back to Arial.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions