Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mikkrg@microsoft.com>2019-08-06 10:17:09 +0300
committerMike Krüger <mikkrg@microsoft.com>2019-08-06 15:16:26 +0300
commit25e59ed2e9e5d19efb9811aa9d17cff9f616b34c (patch)
treed76d7b2d8b6826654d6ed6634a1323ed4c501cb5 /Xwt.Gtk
parent56e6cc5a213f92ff54d1fa6578f6afddff210633 (diff)
Added support for mac font weights that range from 0-15.
Diffstat (limited to 'Xwt.Gtk')
-rw-r--r--Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs b/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs
index 96dd5abf..378586bd 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/FontBackendHandler.cs
@@ -70,7 +70,11 @@ namespace Xwt.GtkBackend
public override object Create (string fontName, double size, FontStyle style, FontWeight weight, FontStretch stretch)
{
- return FontDescription.FromString (fontName + ", " + style + " " + weight + " " + stretch + " " + size.ToString (CultureInfo.InvariantCulture));
+ var result = FontDescription.FromString (fontName + " " + size.ToString (CultureInfo.InvariantCulture));
+ result.Style = (Pango.Style)style;
+ result.Weight = (Pango.Weight)weight;
+ result.Stretch = (Pango.Stretch)stretch;
+ return result;
}
[System.Runtime.InteropServices.DllImport (GtkInterop.LIBFONTCONFIG)]