Unplanned
Last Updated: 03 Dec 2025 13:47 by Angela
Angela
Created on: 03 Dec 2025 13:47
Category: Reporting
Type: Bug Report
1
The fontStyle setting is not used correctly when resolving private fonts with the same name

I load multiple variants of the Segoe UI font as private fonts in my application:

			<!-- Segoe UI -->
			<add fontFamily="Segoe UI" path="Fonts\SegoeUI\segoeui.ttf" fontStyle="Regular" />
			<add fontFamily="Segoe UI" path="Fonts\SegoeUI\seguisb.ttf" fontStyle="Semibold" />

This leads to issues, as there is no "Semibold" option in the System.Drawing.FontStyle enum.

The workaround that can be used to avoid this problem is to use unique font family names. For example

			<add fontFamily="Segoe UI" path="Fonts\SegoeUI\segoeui.ttf"  />
			<add fontFamily="Segoe UI Semibold" path="Fonts\SegoeUI\seguisb.ttf"  />

 

0 comments