#region MIT License /*Copyright (c) 2012 Robert Rouhani SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ #endregion using System; namespace SharpFont { /// /// A list of bit-field constants used with to indicate what kind of operations to /// perform during glyph loading. /// /// /// By default, hinting is enabled and the font's native hinter (see ) is preferred /// over the auto-hinter. You can disable hinting by setting or change the /// precedence by setting . You can also set /// in case you don't want the auto-hinter to be used at all. /// /// See the description of for a special exception (affecting only a handful of /// Asian fonts). /// /// Besides deciding which hinter to use, you can also decide which hinting algorithm to use. See /// for details. /// [Flags] [CLSCompliant(false)] public enum LoadFlags : uint { /// /// Corresponding to 0, this value is used as the default glyph load operation. In this case, the following /// happens: /// /// /// FreeType looks for a bitmap for the glyph corresponding to the face's current size. If one is found, the /// function returns. The bitmap data can be accessed from the glyph slot (see note below). /// /// /// If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is /// loaded from the font file, scaled to device pixels, then ‘hinted’ to the pixel grid in order to optimize /// it. The outline data can be accessed from the glyph slot (see note below). /// /// /// Note that by default, the glyph loader doesn't render outlines into bitmaps. The following flags are used /// to modify this default behaviour to more specific and useful cases. /// Default = 0x0000, /// /// Don't scale the outline glyph loaded, but keep it in font units. /// /// This flag implies and , and unsets /// . /// NoScale = 0x0001, /// /// Disable hinting. This generally generates ‘blurrier’ bitmap glyph when the glyph is rendered in any of the /// anti-aliased modes. See also the note below. /// /// This flag is implied by . /// NoHinting = 0x0002, /// /// Call after the glyph is loaded. By default, the glyph is rendered in /// mode. This can be overridden by or /// . /// /// This flag is unset by . /// Render = 0x0004, /// /// Ignore bitmap strikes when loading. Bitmap-only fonts ignore this flag. /// /// always sets this flag. /// NoBitmap = 0x0008, /// /// Load the glyph for vertical text layout. Don't use it as it is problematic currently. /// VerticalLayout = 0x0010, /// /// Indicates that the auto-hinter is preferred over the font's native hinter. See also the note below. /// ForceAutohint = 0x0020, /// /// Indicates that the font driver should crop the loaded bitmap glyph (i.e., remove all space around its black /// bits). Not all drivers implement this. /// CropBitmap = 0x0040, /// /// Indicates that the font driver should perform pedantic verifications during glyph loading. This is mostly /// used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also. /// Pedantic = 0x0080, /// /// Ignored. Deprecated. /// IgnoreGlobalAdvanceWidth = 0x0200, /// /// This flag is only used internally. It merely indicates that the font driver should not load composite /// glyphs recursively. Instead, it should set the ‘num_subglyph’ and ‘subglyphs’ values of the glyph slot /// accordingly, and set ‘glyph->format’ to . /// /// The description of sub-glyphs is not available to client applications for now. /// /// This flag implies and . /// NoRecurse = 0x0400, /// /// Indicates that the transform matrix set by should be ignored. /// IgnoreTransform = 0x0800, /// /// This flag is used with to indicate that you want to render an outline glyph /// to a 1-bit monochrome bitmap glyph, with 8 pixels packed into each byte of the bitmap data. /// /// Note that this has no effect on the hinting algorithm used. You should rather use /// so that the monochrome-optimized hinting algorithm is used. /// Monochrome = 0x1000, /// /// Indicates that the ‘linearHoriAdvance’ and ‘linearVertAdvance’ fields of should be /// kept in font units. See for details. /// LinearDesign = 0x2000, /// /// Disable auto-hinter. See also the note below. /// NoAutohint = 0x8000, /// /// A bit-flag to be OR-ed with the ‘flags’ parameter of the and /// functions. /// /// If set, it indicates that you want these functions to fail if the corresponding hinting mode or font driver /// doesn't allow for very quick advance computation. /// /// Typically, glyphs which are either unscaled, unhinted, bitmapped, or light-hinted can have their advance /// width computed very quickly. /// /// Normal and bytecode hinted modes, which require loading, scaling, and hinting of the glyph outline, are /// extremely slow by comparison. /// AdvanceFlagFastOnly = 0x20000000 } }