1 /* 2 * DSFML - The Simple and Fast Multimedia Library for D 3 * 4 * Copyright (c) 2013 - 2018 Jeremy DeHaan (dehaan.jeremiah@gmail.com) 5 * 6 * This software is provided 'as-is', without any express or implied warranty. 7 * In no event will the authors be held liable for any damages arising from the 8 * use of this software. 9 * 10 * Permission is granted to anyone to use this software for any purpose, 11 * including commercial applications, and to alter it and redistribute it 12 * freely, subject to the following restrictions: 13 * 14 * 1. The origin of this software must not be misrepresented; you must not claim 15 * that you wrote the original software. If you use this software in a product, 16 * an acknowledgment in the product documentation would be appreciated but is 17 * not required. 18 * 19 * 2. Altered source versions must be plainly marked as such, and must not be 20 * misrepresented as being the original software. 21 * 22 * 3. This notice may not be removed or altered from any source distribution 23 * 24 * 25 * DSFML is based on SFML (Copyright Laurent Gomila) 26 */ 27 28 /** 29 * A glyph is the visual representation of a character. 30 * 31 * The $(U Glyph) structure provides the information needed to handle the glyph: 32 * $(UL 33 * $(LI its coordinates in the font's texture) 34 * $(LI its bounding rectangle) 35 * $(LI the offset to apply to get the starting position of the next glyph)) 36 * 37 * See_Also: 38 * $(FONT_LINK) 39 */ 40 module nudsfml.graphics.glyph; 41 42 public import nudsfml.graphics.rect; 43 44 /** 45 * Structure describing a glyph. 46 */ 47 struct Glyph 48 { 49 /// Offset to move horizontally to the next character. 50 float advance; 51 /// Bounding rectangle of the glyph, in coordinates relative to the baseline. 52 FloatRect bounds; 53 /// Texture coordinates of the glyph inside the font's texture. 54 IntRect textureRect; 55 }