/// <summary> Load a font from a URL /// /// </summary> /// <param name="code"> /// </param> /// <param name="alias">The name used to bind a DefineFont tag to a DefineEditText tag. /// </param> /// <param name="location">remote url or a relative, local file path /// </param> /// <param name="style"> /// </param> /// <param name="hasLayout"> /// </param> public FontBuilder(int code, FontManager manager, System.String alias, System.Uri location, int style, bool hasLayout, bool flashType) : this(code, hasLayout, flashType) { if (manager == null) { throw new NoFontManagerException(); } if (Trace.font) { Trace.trace("Locating font using FontManager '" + manager.GetType().FullName + "'"); } bool useTwips = code != flash.swf.TagValues_Fields.stagDefineFont && code != flash.swf.TagValues_Fields.stagDefineFont2; FontFace fontFace = manager.getEntryFromLocation(location, style, useTwips); if (fontFace == null) { throwFontNotFound(alias, null, style, location.ToString()); } if (Trace.font) { Trace.trace("Initializing font at '" + location.ToString() + "' as '" + alias + "'"); } this.defaultFace = fontFace; init(alias); }
/// <summary> Load a font from a URL /// /// </summary> /// <param name="code"> /// </param> /// <param name="alias">The name used to bind a DefineFont tag to a DefineEditText tag. /// </param> /// <param name="location">remote url or a relative, local file path /// </param> /// <param name="style"> /// </param> /// <param name="hasLayout"> /// </param> public FontBuilder(int code, FontManager manager, System.String alias, System.Uri location, int style, bool hasLayout, bool flashType):this(code, hasLayout, flashType) { if (manager == null) throw new NoFontManagerException(); if (Trace.font) Trace.trace("Locating font using FontManager '" + manager.GetType().FullName + "'"); bool useTwips = code != flash.swf.TagValues_Fields.stagDefineFont && code != flash.swf.TagValues_Fields.stagDefineFont2; FontFace fontFace = manager.getEntryFromLocation(location, style, useTwips); if (fontFace == null) throwFontNotFound(alias, null, style, location.ToString()); if (Trace.font) Trace.trace("Initializing font at '" + location.ToString() + "' as '" + alias + "'"); this.defaultFace = fontFace; init(alias); }