Browse Source

Text: removed autolink-preventing % noise.

pull/77/head
Vladimír Vondruš 12 years ago
parent
commit
643daa7594
  1. 2
      src/Magnum/Text/AbstractFont.h
  2. 28
      src/Magnum/Text/Alignment.h
  3. 2
      src/Magnum/Text/GlyphCache.h
  4. 18
      src/Magnum/Text/Renderer.h
  5. 2
      src/Magnum/Text/fontconverter.cpp

2
src/Magnum/Text/AbstractFont.h

@ -217,7 +217,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @brief Layout the text using font's own layouter * @brief Layout the text using font's own layouter
* @param cache Glyph cache * @param cache Glyph cache
* @param size Font size * @param size Font size
* @param text %Text to layout * @param text Text to layout
* *
* Note that the layouters support rendering of single-line text only. * Note that the layouters support rendering of single-line text only.
* See @ref Renderer class for more advanced text layouting. * See @ref Renderer class for more advanced text layouting.

28
src/Magnum/Text/Alignment.h

@ -50,77 +50,77 @@ namespace Implementation {
} }
/** /**
@brief %Text rendering alignment @brief Text rendering alignment
@see @ref Renderer::render(), @ref Renderer::Renderer() @see @ref Renderer::render(), @ref Renderer::Renderer()
*/ */
enum class Alignment: UnsignedByte { enum class Alignment: UnsignedByte {
/** %Text start and line is at origin */ /** Text start and line is at origin */
LineLeft = Implementation::AlignmentLine|Implementation::AlignmentLeft, LineLeft = Implementation::AlignmentLine|Implementation::AlignmentLeft,
/** /**
* %Text center and line is at origin * Text center and line is at origin
* *
* @see @ref Alignment::LineCenterIntegral * @see @ref Alignment::LineCenterIntegral
*/ */
LineCenter = Implementation::AlignmentLine|Implementation::AlignmentCenter, LineCenter = Implementation::AlignmentLine|Implementation::AlignmentCenter,
/** %Text end and line is at origin */ /** Text end and line is at origin */
LineRight = Implementation::AlignmentLine|Implementation::AlignmentRight, LineRight = Implementation::AlignmentLine|Implementation::AlignmentRight,
/** /**
* %Text start and vertical middle is at origin * Text start and vertical middle is at origin
* *
* @see @ref Alignment::MiddleLeftIntegral * @see @ref Alignment::MiddleLeftIntegral
*/ */
MiddleLeft = Implementation::AlignmentMiddle|Implementation::AlignmentLeft, MiddleLeft = Implementation::AlignmentMiddle|Implementation::AlignmentLeft,
/** /**
* %Text center and vertical middle is at origin * Text center and vertical middle is at origin
* *
* @see @ref Alignment::MiddleRightIntegral * @see @ref Alignment::MiddleRightIntegral
*/ */
MiddleCenter = Implementation::AlignmentMiddle|Implementation::AlignmentCenter, MiddleCenter = Implementation::AlignmentMiddle|Implementation::AlignmentCenter,
/** /**
* %Text end and vertical middle is at origin * Text end and vertical middle is at origin
* *
* @see @ref Alignment::MiddleRightIntegral * @see @ref Alignment::MiddleRightIntegral
*/ */
MiddleRight = Implementation::AlignmentMiddle|Implementation::AlignmentRight, MiddleRight = Implementation::AlignmentMiddle|Implementation::AlignmentRight,
/** %Text start and top is at origin */ /** Text start and top is at origin */
TopLeft = Implementation::AlignmentTop|Implementation::AlignmentLeft, TopLeft = Implementation::AlignmentTop|Implementation::AlignmentLeft,
/** %Text center and top is at origin */ /** Text center and top is at origin */
TopCenter = Implementation::AlignmentTop|Implementation::AlignmentCenter, TopCenter = Implementation::AlignmentTop|Implementation::AlignmentCenter,
/** %Text end and top is at origin */ /** Text end and top is at origin */
TopRight = Implementation::AlignmentTop|Implementation::AlignmentRight, TopRight = Implementation::AlignmentTop|Implementation::AlignmentRight,
/** /**
* %Text center and line is at origin and alignment offset is integral * Text center and line is at origin and alignment offset is integral
* *
* @see @ref Alignment::LineCenter * @see @ref Alignment::LineCenter
*/ */
LineCenterIntegral = Implementation::AlignmentLine|Implementation::AlignmentCenter|Implementation::AlignmentIntegral, LineCenterIntegral = Implementation::AlignmentLine|Implementation::AlignmentCenter|Implementation::AlignmentIntegral,
/** /**
* %Text start and vertical middle is at origin and alignment offset is integral * Text start and vertical middle is at origin and alignment offset is integral
* *
* @see @ref Alignment::MiddleLeft * @see @ref Alignment::MiddleLeft
*/ */
MiddleLeftIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentLeft|Implementation::AlignmentIntegral, MiddleLeftIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentLeft|Implementation::AlignmentIntegral,
/** /**
* %Text center and vertical middle is at origin and alignment offset is integral * Text center and vertical middle is at origin and alignment offset is integral
* *
* @see @ref Alignment::MiddleCenter * @see @ref Alignment::MiddleCenter
*/ */
MiddleCenterIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentCenter|Implementation::AlignmentIntegral, MiddleCenterIntegral = Implementation::AlignmentMiddle|Implementation::AlignmentCenter|Implementation::AlignmentIntegral,
/** /**
* %Text end and vertical middle is at origin and alignment offset is integral * Text end and vertical middle is at origin and alignment offset is integral
* *
* @see @ref Alignment::MiddleRight * @see @ref Alignment::MiddleRight
*/ */

2
src/Magnum/Text/GlyphCache.h

@ -45,7 +45,7 @@ Contains font glyphs prerendered into texture atlas.
## Usage ## Usage
Create %GlyphCache object with sufficient size and then call Create GlyphCache object with sufficient size and then call
@ref AbstractFont::createGlyphCache() to fill it with glyphs. @ref AbstractFont::createGlyphCache() to fill it with glyphs.
@code @code
Text::AbstractFont* font; Text::AbstractFont* font;

18
src/Magnum/Text/Renderer.h

@ -56,8 +56,8 @@ class MAGNUM_TEXT_EXPORT AbstractRenderer {
* @param font Font * @param font Font
* @param cache Glyph cache * @param cache Glyph cache
* @param size Font size * @param size Font size
* @param text %Text to render * @param text Text to render
* @param alignment %Text alignment * @param alignment Text alignment
* *
* Returns tuple with vertex positions, texture coordinates, indices * Returns tuple with vertex positions, texture coordinates, indices
* and rectangle spanning the rendered text. * and rectangle spanning the rendered text.
@ -80,7 +80,7 @@ class MAGNUM_TEXT_EXPORT AbstractRenderer {
/** @brief Index buffer */ /** @brief Index buffer */
Buffer& indexBuffer() { return _indexBuffer; } Buffer& indexBuffer() { return _indexBuffer; }
/** @brief %Mesh */ /** @brief Mesh */
Mesh& mesh() { return _mesh; } Mesh& mesh() { return _mesh; }
/** /**
@ -164,7 +164,7 @@ class MAGNUM_TEXT_EXPORT AbstractRenderer {
}; };
/** /**
@brief %Text renderer @brief Text renderer
Lays out the text into mesh using given font. Use of ligatures, kerning etc. Lays out the text into mesh using given font. Use of ligatures, kerning etc.
depends on features supported by particular font and its layouter. depends on features supported by particular font and its layouter.
@ -241,11 +241,11 @@ template<UnsignedInt dimensions> class MAGNUM_TEXT_EXPORT Renderer: public Abstr
* @param font Font * @param font Font
* @param cache Glyph cache * @param cache Glyph cache
* @param size Font size * @param size Font size
* @param text %Text to render * @param text Text to render
* @param vertexBuffer %Buffer where to store vertices * @param vertexBuffer Buffer where to store vertices
* @param indexBuffer %Buffer where to store indices * @param indexBuffer Buffer where to store indices
* @param usage Usage of vertex and index buffer * @param usage Usage of vertex and index buffer
* @param alignment %Text alignment * @param alignment Text alignment
* *
* Returns mesh prepared for use with @ref Shaders::AbstractVector * Returns mesh prepared for use with @ref Shaders::AbstractVector
* subclasses and rectangle spanning the rendered text. * subclasses and rectangle spanning the rendered text.
@ -257,7 +257,7 @@ template<UnsignedInt dimensions> class MAGNUM_TEXT_EXPORT Renderer: public Abstr
* @param font Font * @param font Font
* @param cache Glyph cache * @param cache Glyph cache
* @param size Font size * @param size Font size
* @param alignment %Text alignment * @param alignment Text alignment
*/ */
explicit Renderer(AbstractFont& font, const GlyphCache& cache, Float size, Alignment alignment = Alignment::LineLeft); explicit Renderer(AbstractFont& font, const GlyphCache& cache, Float size, Alignment alignment = Alignment::LineLeft);
Renderer(AbstractFont&, GlyphCache&&, Float, Alignment alignment = Alignment::LineLeft) = delete; /**< @overload */ Renderer(AbstractFont&, GlyphCache&&, Float, Alignment alignment = Alignment::LineLeft) = delete; /**< @overload */

2
src/Magnum/Text/fontconverter.cpp

@ -62,7 +62,7 @@ Arguments:
- `--font FONT` -- font plugin - `--font FONT` -- font plugin
- `--converter CONVERTER` -- font converter plugin - `--converter CONVERTER` -- font converter plugin
- `--plugin-dir DIR` -- base plugin dir (defaults to plugin directory in - `--plugin-dir DIR` -- base plugin dir (defaults to plugin directory in
%Magnum install location) Magnum install location)
- `--characters CHARACTERS` -- characters to include in the output (default: - `--characters CHARACTERS` -- characters to include in the output (default:
`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?!:;,.&nbsp;`) `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789?!:;,.&nbsp;`)
- `--font-size N` -- input font size (default: `128`) - `--font-size N` -- input font size (default: `128`)

Loading…
Cancel
Save