var searchIndex = {}; searchIndex["rusttype"] = {"doc":"RustType is a pure Rust alternative to libraries like FreeType.","items":[[3,"Rect","rusttype","A rectangle, with top-left corner at `min`, and bottom-right corner at `max`.",null,null],[12,"min","","",0,null],[12,"max","","",0,null],[3,"Point","","A point in 2-dimensional space, with each dimension of type `N`.",null,null],[12,"x","","",1,null],[12,"y","","",1,null],[3,"Vector","","A vector in 2-dimensional space, with each dimension of type `N`.",null,null],[12,"x","","",2,null],[12,"y","","",2,null],[3,"Line","","A straight line between two points, `p[0]` and `p[1]`",null,null],[12,"p","","",3,null],[3,"Curve","","A quadratic Bezier curve, starting at `p[0]`, ending at `p[2]`, with control point `p[1]`.",null,null],[12,"p","","",4,null],[3,"FontCollection","","A collection of fonts read straight from a font file's data. The data in the collection is not validated.\nThis structure may or may not own the font data.",null,null],[3,"Font","","A single font. This may or may not own the font data.",null,null],[3,"Bytes","","A newtype wrapper for `Cow<[u8]>` that can be targetted by `From` and `Into`. This is intended\nto be used for providing convenient APIs that can accept `Vec<u8>`s or `&[u8]`s or other types\nthat can be read as `[u8]`s (feel free to provide your own `From` implementations).",null,null],[12,"0","","",5,null],[3,"Codepoint","","Represents a Unicode code point.",null,null],[12,"0","","",6,null],[3,"GlyphId","","Represents a glyph identifier for a particular font. This identifier will not necessarily correspond to\nthe correct glyph in a font other than the one that it was obtained from.",null,null],[12,"0","","",7,null],[3,"Glyph","","A single glyph of a font. this may either be a thin wrapper referring to the font and the glyph id, or\nit may be a standalone glyph that owns the data needed by it.",null,null],[3,"HMetrics","","The "horizontal metrics" of a glyph. This is useful for calculating the horizontal offset of a glyph\nfrom the previous one in a string when laying a string out horizontally.",null,null],[12,"advance_width","","The horizontal offset that the origin of the next glyph should be from the origin of this glyph.",8,null],[12,"left_side_bearing","","The horizontal offset between the origin of this glyph and the leftmost edge/point of the glyph.",8,null],[3,"VMetrics","","The "vertical metrics" of a font at a particular scale. This is useful for calculating the amount of\nvertical space to give a line of text, and for computing the vertical offset between successive lines.",null,null],[12,"ascent","","The highest point that any glyph in the font extends to above the baseline. Typically positive.",9,null],[12,"descent","","The lowest point that any glyph in the font extends to below the baseline. Typically negative.",9,null],[12,"line_gap","","The gap to leave between the descent of one line and the ascent of the next. This is of\ncourse only a guideline given by the font's designers.",9,null],[3,"SizedGlyph","","A glyph augmented with scaling information. You can query such a glyph for information that depends\non the scale of the glyph.",null,null],[3,"PositionedGlyph","","A glyph augmented with positioning and scaling information. You can query such a glyph for information\nthat depends on the scale and position of the glyph.",null,null],[3,"Pixels","","A uniform font scaling that makes the height of the rendered font a specific number of pixels. For example,\nif you want to render a font with a height of 20 pixels, use `Pixels(20.0)`.",null,null],[12,"0","","",10,null],[3,"PixelsXY","","A nonuniform font scaling. `PixelsXY(x, y)` produces a scaling that makes the height of the rendered font\n`y` pixels high, with a horizontal scale factor on top of that of `x/y`. For example, if you want to render\na font with a height of 20 pixels, but have it horizontally stretched by a factor of two, use\n`PixelsXY(40.0, 20.0)`.",null,null],[12,"0","","",11,null],[12,"1","","",11,null],[3,"Scale","","An opaque struct representing a common format for font scaling. You typically won't use this struct directly,\ninstead using `Pixels` or `PixelsXY` and the `Into` trait to pass them to functions.",null,null],[3,"GlyphIter","","",null,null],[3,"LayoutIter","","",null,null],[3,"Contour","","A closed loop consisting of a sequence of `Segment`s.",null,null],[12,"segments","","",12,null],[4,"CodepointOrGlyphId","","Represents either a Unicode code point, or a glyph identifier for a font.",null,null],[13,"Codepoint","","",13,null],[13,"GlyphId","","",13,null],[4,"Segment","","Part of a `Contour`, either a `Line` or a `Curve`.",null,null],[13,"Line","","",14,null],[13,"Curve","","",14,null],[5,"point","","A convenience function for generating `Point`s.",null,{"inputs":[{"name":"n"},{"name":"n"}],"output":{"name":"point"}}],[5,"vector","","A convenience function for generating `Vector`s.",null,{"inputs":[{"name":"n"},{"name":"n"}],"output":{"name":"vector"}}],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"sub","","",1,null],[11,"add","","",2,null],[11,"sub","","",2,null],[11,"mul","","",2,null],[11,"mul","","",2,null],[11,"add","","",1,null],[11,"sub","","",1,null],[11,"add","","",2,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"fmt","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"width","","",0,null],[11,"height","","",0,null],[11,"fmt","","",6,null],[11,"clone","","",6,null],[11,"fmt","","",13,null],[11,"clone","","",13,null],[11,"fmt","","",7,null],[11,"clone","","",7,null],[11,"clone","","",15,null],[11,"fmt","","",8,null],[11,"clone","","",8,null],[11,"fmt","","",9,null],[11,"clone","","",9,null],[11,"clone","","",16,null],[11,"clone","","",17,null],[11,"clone","","",10,null],[11,"clone","","",11,null],[11,"clone","","",18,null],[11,"from","","",18,{"inputs":[{"name":"pixels"}],"output":{"name":"scale"}}],[11,"from","","",18,{"inputs":[{"name":"pixelsxy"}],"output":{"name":"scale"}}],[11,"from","","",5,{"inputs":[{"name":"box"}],"output":{"name":"bytes"}}],[11,"from","","",5,{"inputs":[{"name":"vec"}],"output":{"name":"bytes"}}],[11,"from","","",5,{"inputs":[{"name":"cow"}],"output":{"name":"bytes"}}],[11,"from","","",5,null],[11,"from","","",6,{"inputs":[{"name":"char"}],"output":{"name":"codepoint"}}],[11,"from","","",13,{"inputs":[{"name":"codepoint"}],"output":{"name":"codepointorglyphid"}}],[11,"from","","",13,{"inputs":[{"name":"glyphid"}],"output":{"name":"codepointorglyphid"}}],[11,"from","","",13,{"inputs":[{"name":"char"}],"output":{"name":"codepointorglyphid"}}],[11,"from_bytes","","Constructs a font collection from an array of bytes, typically loaded from a font file.\nThis array may be owned (e.g. `Vec<u8>`), or borrowed (`&[u8]`).\nAs long as `From<T>` is implemented for `Bytes` for some type `T`, `T` can be used as input.",19,{"inputs":[{"name":"b"}],"output":{"name":"fontcollection"}}],[11,"into_font","","In the common case that a font collection consists of only one font, this function\nconsumes this font collection and turns it into a font. If this is not the case,\nor the font is not valid (read: not supported by this library), `None` is returned.",19,null],[11,"font_at","","Gets the font at index `i` in the font collection, if it exists and is valid.\nThe produced font borrows the font data that is either borrowed or owned by this font collection.",19,null],[11,"v_metrics","","The "vertical metrics" for this font at a given scale. These metrics are shared by all of the glyphs\nin the font.\nSee `VMetrics` for more detail.",20,null],[11,"glyph_count","","The number of glyphs present in this font. Glyph identifiers for this font will always be in the range\n`0..self.glyph_count()`",20,null],[11,"glyph","","Returns the corresponding glyph for a Unicode code point or a glyph id for this font.\nIf id corresponds to a glyph identifier, the identifier must be valid (smaller than `self.glyph_count()`),\notherwise `None` is returned.",20,null],[11,"glyphs_for","","A convenience function.",20,null],[11,"layout","","A convenience function for laying out glyphs for a string horizontally. It does not take control\ncharacters like line breaks into account, as treatment of these is likely to depend on the application.",20,null],[11,"pair_kerning","","Returns additional kerning to apply as well as that given by HMetrics for a particular pair of glyphs.",20,null],[11,"next","","",21,null],[11,"next","","",22,null],[11,"font","","The font to which this glyph belongs. If the glyph is a standalone glyph that owns its resources,\nit no longer has a reference to the font which it was created from (using `standalone()`). In which\ncase, `None` is returned.",15,null],[11,"id","","The glyph identifier for this glyph.",15,null],[11,"scaled","","Augments this glyph with scaling information, making methods that depend on the scale of the glyph\navailable.",15,null],[11,"standalone","","Turns a `Glyph<'a>` into a `Glyph<'static>`. This produces a glyph that owns its resources,\nextracted from the font. This glyph can outlive the font that it comes from.",15,null],[11,"fmt","","",14,null],[11,"clone","","",14,null],[11,"fmt","","",12,null],[11,"clone","","",12,null],[11,"positioned","","Augments this glyph with positioning information, making methods that depend on the position of the\nglyph available.",16,null],[11,"h_metrics","","Retrieves the "horizontal metrics" of this glyph. See `HMetrics` for more detail.",16,null],[11,"shape","","Produces a list of the contours that make up the shape of this glyph. Each contour consists of\na sequence of segments. Each segment is either a straight `Line` or a `Curve`.",16,null],[11,"exact_bounding_box","","The bounding box of the shape of this glyph, not to be confused with `pixel_bounding_box`, the\nconservative pixel-boundary bounding box. The coordinates are relative to the glyph's origin.",16,null],[11,"standalone","","Constructs a glyph that owns its data from this glyph. This is similar to `Glyph::standalone`. See\nthat function for more details.",16,null],[11,"deref","","",16,null],[11,"pixel_bounding_box","","The conservative pixel-boundary bounding box for this glyph. This is the smallest rectangle\naligned to pixel boundaries that encloses the shape of this glyph at this position.",17,null],[11,"positioned_shape","","Similar to `shape()`, but with the position of the glyph taken into account.",17,null],[11,"draw","","Rasterises this glyph. For each pixel in the rect given by `pixel_bounding_box()`, `o` is called:",17,null],[11,"standalone","","Constructs a glyph that owns its data from this glyph. This is similar to `Glyph::standalone`. See\nthat function for more details.",17,null],[11,"deref","","",17,null]],"paths":[[3,"Rect"],[3,"Point"],[3,"Vector"],[3,"Line"],[3,"Curve"],[3,"Bytes"],[3,"Codepoint"],[3,"GlyphId"],[3,"HMetrics"],[3,"VMetrics"],[3,"Pixels"],[3,"PixelsXY"],[3,"Contour"],[4,"CodepointOrGlyphId"],[4,"Segment"],[3,"Glyph"],[3,"SizedGlyph"],[3,"PositionedGlyph"],[3,"Scale"],[3,"FontCollection"],[3,"Font"],[3,"GlyphIter"],[3,"LayoutIter"]]}; initSearch(searchIndex);