1 /* 2 * DSFML - The Simple and Fast Multimedia Library for D 3 * 4 * Copyright (c) 2013 - 2017 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 /** 26 * A glyph is the visual representation of a character. 27 * 28 * The $(U Glyph) structure provides the information needed to handle the glyph: 29 * $(UL 30 * $(LI its coordinates in the font's texture) 31 * $(LI its bounding rectangle) 32 * $(LI the offset to apply to get the starting position of the next glyph)) 33 * 34 * See_Also: 35 * $(FONT_LINK) 36 */ 37 module dsfml.graphics.glyph; 38 39 public import dsfml.graphics.rect; 40 41 /** 42 * Structure describing a glyph. 43 */ 44 struct Glyph 45 { 46 /// Offset to move horizontally to the next character. 47 float advance; 48 /// Bounding rectangle of the glyph, in coordinates relative to the baseline. 49 FloatRect bounds; 50 /// Texture coordinates of the glyph inside the font's texture. 51 IntRect textureRect; 52 }