Vladimír Vondruš
cc19e78983
Text: moved glyph caching into separate classes.
...
The API is similar for both basic and distance field caching.
13 years ago
Vladimír Vondruš
06971775cd
Text: properly compute glyph count in FreeTypeFont layouter.
...
It was the same as byte count, thus working only for pure ASCII, not
UTF-8.
13 years ago
Vladimír Vondruš
3c9c90ecf7
Text: assert that also freeing up FreeType resources doesn't fail.
13 years ago
Vladimír Vondruš
0f4e2f8a37
Text: made constructors explicit.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
e9efd87e12
Text: off-by-one mistake.
...
Not exactly an error, because reserving one byte more doesn't harm
anything, but probably result of earlier copypaste from prerender().
13 years ago
Vladimír Vondruš
2afda6f34d
Text: split out HarfBuzz layouting into new HarfBuzzFont class.
...
It now allows to transparently select between FreeType and HarfBuzz
layouting. The new class is built only if USE_HARFBUZZ is enabled.
13 years ago
Vladimír Vondruš
9525dfd51b
Text: abstract base for fonts and layouters.
...
Font and text layouting is now abstracted out from its implementation.
Font class is renamed to FreeTypeFont and all the work can be done
through AbstractFont and AbstractLayouter interface.
13 years ago
Vladimír Vondruš
c864fefb95
Text: moved FontRenderer into Font header.
...
Now everything related to FreeType and HarfBuzz is in one header.
13 years ago
Vladimír Vondruš
b4950b59ac
Text: moved TextLayouter from TextRenderer internals to Font header.
...
Preparation for the whole thing to be testable, moving
implementation-dependent (FreeType/HarfBuzz) things together.
13 years ago
Vladimír Vondruš
195ec4e9b2
Text: synchronized function parameter naming with documentation.
13 years ago
Vladimír Vondruš
7a99a4b326
Shortened (texture) filtering types to comply with OpenGL naming.
...
The documentation already used them, so why complicate things further.
13 years ago
Vladimír Vondruš
12f719f177
Text: prerendering Font for use with distance-field rendering.
...
Currently there is no builtin shader capable of it, will come later.
13 years ago
Vladimír Vondruš
babc850102
Text: minor code cleanup.
13 years ago
Vladimír Vondruš
f07957a37f
A little bit of const fascism.
13 years ago
Vladimír Vondruš
a7a4d3eeb8
Text: using new type aliases in whole Text namespace.
13 years ago
Vladimír Vondruš
b38ec8152b
Text: ability to compile the library without HarfBuzz support.
...
The text will be rendered without all the nifty features like kerning
and it will most probably fail on everything non-latin, but HarfBuzz is
currently PITA on some systems.
HarfBuzz usage can be configured using USE_HARFBUZZ CMake option.
13 years ago
Vladimír Vondruš
1cf2087817
Text: code cleanup -- merged two loops into one.
13 years ago
Vladimír Vondruš
afea4f34db
Text: proper UTF-8 support in Font::prerender().
13 years ago
Vladimír Vondruš
6458b03a76
Text: ability to create Font from memory instead of file.
13 years ago
Vladimír Vondruš
a45454ca73
Using CORRADE_INTERNAL_ASSERT_OUTPUT() where appropriate.
13 years ago
Vladimír Vondruš
cc2eac41bc
Text: removing duplicate glyphs in Font::prerender().
13 years ago
Vladimír Vondruš
16571a884b
Text: prerender font using dedicated function, not in constructor.
...
The number of possible combinations would explode for no reason when
opening font from different locations will be implemented.
13 years ago
Vladimír Vondruš
5819dd4bd7
Math: matrix/vector rework, part 3: conversion as explicit constructor.
...
Also updated all dependent classes to follow the change, such as Color
and Rectangle. Backwards compatibility for GCC 4.6 (with lack of support
for delegating constructors) will be done as non-constexpr constructor
using operator=().
13 years ago
Vladimír Vondruš
08d9f65b06
Text: assert that {ARB,EXT}_texture_rg is supported.
...
EXT_texture_rg is not available on my OpenGL ES 2.0 implementation, will
find alternative later. At least it now compiles.
14 years ago
Vladimír Vondruš
fdded7281d
Renamed *Texture::set*Data() to set*Image().
...
Better consistency with OpenGL naming.
14 years ago
Vladimír Vondruš
9d260b72d8
Text: initial implementation of font and text rendering.
...
The library uses FreeType for glyph pre-rendering and basic glyph
geometry and HarfBuzz for text layouting (i.e. ligatures, kerning, ...).
Currently all used glyphs must be prerendered into texture atlas, other
glyphs are simply not rendered (although the layouting code handles them
like if they are there).
Text rendering supports UTF-8, although glyph pre-rendering is currently
ASCII only, as I couldn't find any working implementation of Unicode
STL function in recent GCC versions. Will be fixed later.
14 years ago