public Font(Face face) : base(IntPtr.Zero) { if (face == null) { throw new ArgumentNullException(nameof(face)); } Handle = HarfBuzzApi.hb_font_create(face.Handle); OpenTypeMetrics = new OpenTypeMetrics(this); }
public Font(Font parent) : base(IntPtr.Zero) { if (parent == null) { throw new ArgumentNullException(nameof(parent)); } if (parent.Handle == IntPtr.Zero) { throw new ArgumentException(nameof(parent.Handle)); } Parent = parent; Handle = HarfBuzzApi.hb_font_create_sub_font(parent.Handle); OpenTypeMetrics = new OpenTypeMetrics(this); }