コード例 #1
0
 public static Font ToXwt(this FontData backend)
 {
     if (backend == null)
     {
         return(null);
     }
     return(CreateFrontend <Font> (backend));
 }
コード例 #2
0
 public void CopyFrom(FontData font)
 {
     Family  = font.Family;
     Size    = font.Size;
     Style   = font.Style;
     Weight  = font.Weight;
     Stretch = font.Stretch;
 }
コード例 #3
0
        public static void SetFont(this AG.Paint paint, FontData font)
        {
            paint.SetTypeface(font.Typeface);

            // textsize is in pixel, fontsize in points
            // point = pix * 72 / screen.dpi => pix = point * dpi / 72
            paint.TextSize = (float)(font.Size * Xdpi / 72f) * FontFactor;
#if __ANDROID_21__
            paint.LetterSpacing = ....
#endif
        }