internal bool Analyze( [Out] out FontFileType fontFileType, [Out] out FontFaceType fontFaceType, [Out] out uint numberOfFaces, [Out] out int hr) { bool isSupported = false; hr = _fontFile.Analyze(out isSupported, out fontFileType, out fontFaceType, out numberOfFaces); return(isSupported); }
/// <summary> /// Creates an object that represents a font face. /// </summary> /// <param name="fontFaceType">A value that indicates the type of file format of the font face.</param> /// <param name="fontFiles">A font file object representing the font face. Because <see cref="IDWriteFontFace"/> maintains its own references to the input font file objects, you may release them after this call.</param> /// <param name="faceIndex">The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.</param> /// <param name="fontFaceSimulationFlags">A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face.</param> /// <returns>Instance of <see cref="IDWriteFontFace"/> or null if failed.</returns> public IDWriteFontFace CreateFontFace(FontFaceType fontFaceType, IDWriteFontFile[] fontFiles, int faceIndex = 0, FontSimulations fontFaceSimulationFlags = FontSimulations.None) { var result = CreateFontFace( fontFaceType, fontFiles.Length, fontFiles, faceIndex, fontFaceSimulationFlags, out var fontFace); return(result.Failure ? null : fontFace); }
internal bool Analyze( [Out] out FontFileType fontFileType, [Out] out FontFaceType fontFaceType, [Out] out uint numberOfFaces) { bool isSupported = false; int hr; isSupported = Analyze(out fontFileType, out fontFaceType, out numberOfFaces, out hr); Marshal.ThrowExceptionForHR(hr); return(isSupported); }
/// <summary> /// Creates an object that represents a font face. /// </summary> /// <param name="fontFaceType">A value that indicates the type of file format of the font face.</param> /// <param name="fontFiles">A font file object representing the font face. Because <see cref="IDWriteFontFace"/> maintains its own references to the input font file objects, you may release them after this call.</param> /// <param name="faceIndex">The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.</param> /// <param name="fontFaceSimulationFlags">A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face.</param> /// <returns>Instance of <see cref="IDWriteFontFace"/> or null if failed.</returns> public IDWriteFontFace CreateFontFace(FontFaceType fontFaceType, IDWriteFontFile[] fontFiles, int faceIndex = 0, FontSimulations fontFaceSimulationFlags = FontSimulations.None) { Guard.NotNullOrEmpty(fontFiles, nameof(fontFiles)); var result = CreateFontFace( fontFaceType, fontFiles.Length, fontFiles, faceIndex, fontFaceSimulationFlags, out IDWriteFontFace fontFace); return(result.Failure ? null : fontFace); }
/// <summary> /// Creates an object that represents a font face. /// </summary> /// <param name="factory">A reference to a DirectWrite factory <see cref="Factory"/></param> /// <param name="fontFaceType">A value that indicates the type of file format of the font face. </param> /// <param name="fontFiles">A font file object representing the font face. Because<see cref="T:SharpDX.DirectWrite.FontFace" /> maintains its own references to the input font file objects, you may release them after this call. </param> /// <param name="faceIndex">The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero. </param> /// <param name="fontFaceSimulationFlags">A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face. </param> /// <unmanaged>HRESULT IDWriteFactory::CreateFontFace([None] DWRITE_FONT_FACE_TYPE fontFaceType,[None] int numberOfFiles,[In, Buffer] const IDWriteFontFile** fontFiles,[None] int faceIndex,[None] DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags,[Out] IDWriteFontFace** fontFace)</unmanaged> public FontFace(Factory factory, FontFaceType fontFaceType, FontFile[] fontFiles, int faceIndex, FontSimulations fontFaceSimulationFlags) { factory.CreateFontFace(fontFaceType, fontFiles.Length, fontFiles, faceIndex, fontFaceSimulationFlags, this); }
internal static DWRITE_FONT_FACE_TYPE Convert(FontFaceType fontFaceType) { }