Public bug reported: The current mono implementation of System.Drawing.SystemFonts is hard- coded to return "Microsoft Sans Serif" and "Tahoma" for system font queries. Even though this matches MSDN-documented values for Windows, this violates the intended semantics of this class, and produces surprises for cross-platform Winforms developers.
With fontconfig usage in libgdiplus, a quick and (kind of) dirty fix is to replace them with "Sans" (or "Ubuntu" if you want to.) A more MSDN-friendly solution[1] is to return GenericSansSerif directly, however this ends up pointing to libgdiplus's implementation which ends up giving MS Sans Serif too. [1]: https://msdn.microsoft.com/en-us/library/system.drawing.systemfonts.defaultfont(v=vs.110).aspx A related workaround in fontconfig is to alias Microsoft Sans Serif to Helvetica in 30-metric-aliases.conf (fd.o 95232). This should at least solve the issue that fontconfig most likely knows nothing about matching "Microsoft Sans Serif". ** Affects: mono Importance: Unknown Status: Unknown ** Affects: mono (Ubuntu) Importance: Undecided Status: New ** Bug watch added: bugzilla.xamarin.com/ #40791 http://bugzilla.xamarin.com/show_bug.cgi?id=40791 ** Also affects: mono via http://bugzilla.xamarin.com/show_bug.cgi?id=40791 Importance: Unknown Status: Unknown ** Description changed: The current mono implementation of System.Drawing.SystemFonts is hard- coded to return "Microsoft Sans Serif" and "Tahoma" for system font queries. Even though this matches MSDN-documented values for Windows, - this violates the intended semantics of this class. + this violates the intended semantics of this class, and produces + surprises for cross-platform Winforms developers. With fontconfig usage in libgdiplus, a quick and (kind of) dirty fix is to replace them with "Sans" (or "Ubuntu" if you want to.) A more MSDN-friendly solution[1] is to return GenericSansSerif directly, however this ends up pointing to libgdiplus's implementation which ends up giving MS Sans Serif too. - [1]: https://msdn.microsoft.com/en-us/library/system.drawing.systemfonts.defaultfont(v=vs.110).aspx + [1]: https://msdn.microsoft.com/en-us/library/system.drawing.systemfonts.defaultfont(v=vs.110).aspx A related workaround in fontconfig is to alias Microsoft Sans Serif to Helvetica in 30-metric-aliases.conf (fd.o 95232). ** Description changed: The current mono implementation of System.Drawing.SystemFonts is hard- coded to return "Microsoft Sans Serif" and "Tahoma" for system font queries. Even though this matches MSDN-documented values for Windows, this violates the intended semantics of this class, and produces surprises for cross-platform Winforms developers. With fontconfig usage in libgdiplus, a quick and (kind of) dirty fix is to replace them with "Sans" (or "Ubuntu" if you want to.) A more MSDN-friendly solution[1] is to return GenericSansSerif directly, however this ends up pointing to libgdiplus's implementation which ends up giving MS Sans Serif too. [1]: https://msdn.microsoft.com/en-us/library/system.drawing.systemfonts.defaultfont(v=vs.110).aspx A related workaround in fontconfig is to alias Microsoft Sans Serif to - Helvetica in 30-metric-aliases.conf (fd.o 95232). + Helvetica in 30-metric-aliases.conf (fd.o 95232). This should at least + solve the issue that fontconfig most likely knows nothing about matching + "Microsoft Sans Serif". -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to mono in Ubuntu. https://bugs.launchpad.net/bugs/1577241 Title: Sys.Drawing.SystemFonts does not return UI fonts being used in system Status in mono: Unknown Status in mono package in Ubuntu: New Bug description: The current mono implementation of System.Drawing.SystemFonts is hard- coded to return "Microsoft Sans Serif" and "Tahoma" for system font queries. Even though this matches MSDN-documented values for Windows, this violates the intended semantics of this class, and produces surprises for cross-platform Winforms developers. With fontconfig usage in libgdiplus, a quick and (kind of) dirty fix is to replace them with "Sans" (or "Ubuntu" if you want to.) A more MSDN-friendly solution[1] is to return GenericSansSerif directly, however this ends up pointing to libgdiplus's implementation which ends up giving MS Sans Serif too. [1]: https://msdn.microsoft.com/en-us/library/system.drawing.systemfonts.defaultfont(v=vs.110).aspx A related workaround in fontconfig is to alias Microsoft Sans Serif to Helvetica in 30-metric-aliases.conf (fd.o 95232). This should at least solve the issue that fontconfig most likely knows nothing about matching "Microsoft Sans Serif". To manage notifications about this bug go to: https://bugs.launchpad.net/mono/+bug/1577241/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

