示例#1
0
 private void Update()
 {
     if (_control != null)
     {
         var ff = new Noesis.FontFamily(fontFamily.Value);
         _control.FontFamily = ff;
     }
 }
 /// <summary>
 /// Loads a font with the specified settings. It should be used for text measuring purposes.
 /// </summary>
 /// <param name="family">Family name object.</param>
 /// <param name="style">Italic style.</param>
 /// <param name="weight">Bold style.</param>
 /// <param name="size">Font size in pixels.</param>
 /// <param name="strokeThickness">Stroke thickness in pixels.</param>
 /// <returns>Font object.</returns>
 public static Noesis.Font LoadFont(Noesis.FontFamily family, Noesis.FontStyle style,
     Noesis.FontWeight weight, float size, float strokeThickness)
 {
     return new Noesis.Font(family, style, weight, size, strokeThickness);
 }
示例#3
0
 internal static HandleRef getCPtr(FontFamily obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
示例#4
0
 public static void SetFontFamily(DependencyObject element, FontFamily family)
 {
     NoesisGUI_PINVOKE.TextElement_SetFontFamily(DependencyObject.getCPtr(element), FontFamily.getCPtr(family));
     if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
     {
         throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
     }
 }