Wrong font-weight when using WebExport with a specific font

I am using XD and WebExport to create my website.
However, I have found that the font-weight is not outputting correctly when using certain fonts.

The explanation is given below.

  1. Noto Sans Japanese is used.
    It is provided by GoogleFont.
    (Google Fonts)

  2. Place text on XD using Noto Sans Japanese.

  3. Specify font-weight as Medium.

  4. Output the text by WebExport.

  5. The output css will show “font-weight: normal;”.

My desired output is “font-weight: 500;”.

Supplementation
Even if font-weight is “Regular”, the output css shows “font-weight: normal;”.
From this, it seems that the difference between font-weight Regular and Medium cannot be determined.

I would be very happy if you could fix this bug.

Thanks for reading.

1 Like

Hi, thank you for your feedback. I don’t know if that data is available for the font info but I’ll check into it! In the meantime you can manually override this by opening the element panel and typing in:

font-weight: 500

in the styles field.

This will replace the default CSS settings.

Here is an update. The font weight value I get from XD is one of the following:

	"normal", "light", "thin", "bold"

https://developer.adobe.com/xd/uxp/develop/reference/Text/#fontstyle

I’ve posted a feature request to Adobe to see if I can get the fontWeight as a number.