Browse Source

Text: doc++

pull/641/head
Vladimír Vondruš 2 years ago
parent
commit
723cf155a8
  1. 2
      doc/snippets/Text.cpp
  2. 4
      src/Magnum/Text/AbstractShaper.h
  3. 12
      src/Magnum/Text/Feature.h
  4. 2
      src/MagnumPlugins/MagnumFont/Test/MagnumFontTest.cpp

2
doc/snippets/Text.cpp

@ -345,7 +345,7 @@ shaper->glyphOffsetsAdvancesInto(
glyphs2.slice(&GlyphInfo::offset),
glyphs2.slice(&GlyphInfo::advance));
/* Finally shape "!" shaped with a regular font again */
/* Finally shape "!" with a regular font again */
shaper->shape("Hello, world!", 12, 13);
Containers::StridedArrayView1D<GlyphInfo> glyphs3 =
arrayAppend(glyphs, NoInit, shaper->glyphCount());

4
src/Magnum/Text/AbstractShaper.h

@ -351,8 +351,8 @@ class MAGNUM_TEXT_EXPORT AbstractShaper {
* @param[out] offsets Where to put glyph offsets
* @param[out] advances Where to put glyph advances
*
* The @p offsets and @p advances views are all expected to have a size
* of @ref glyphCount(). The @p offsets specify where to put the glyph
* The @p offsets and @p advances views are expected to have a size of
* @ref glyphCount(). The @p offsets specify where to put the glyph
* relative to current cursor (which is then further offset for the
* particular glyph rectangle returned from the glyph cache) and
* @p advances specify in which direction to move the cursor for the

12
src/Magnum/Text/Feature.h

@ -227,6 +227,9 @@ enum class Feature: UnsignedInt {
* `clig`, [Contextual Ligatures](https://learn.microsoft.com/typography/opentype/spec/features_ae#clig).
* Ligation and alternate feature intended for all scripts.
* @m_keywords{clig}
* @see @ref Feature::StandardLigatures,
* @relativeref{Feature,DiscretionaryLigatures},
* @relativeref{Feature,HistoricalLigatures}
*/
ContextualLigatures = Utility::Endianness::fourCC('c', 'l', 'i', 'g'),
@ -976,6 +979,9 @@ enum class Feature: UnsignedInt {
* `dlig`, [Discretionary Ligatures](https://learn.microsoft.com/typography/opentype/spec/features_ae#dlig).
* Ligation and alternate feature intended for all scripts.
* @m_keywords{dlig}
* @see @ref Feature::StandardLigatures,
* @relativeref{Feature,ContextualLigatures},
* @relativeref{Feature,HistoricalLigatures}
*/
DiscretionaryLigatures = Utility::Endianness::fourCC('d', 'l', 'i', 'g'),
@ -1088,6 +1094,9 @@ enum class Feature: UnsignedInt {
* `hlig`, [Historical Ligatures](https://learn.microsoft.com/typography/opentype/spec/features_fj#hlig).
* Ligation and alternate feature intended for all scripts.
* @m_keywords{hlig}
* @see @ref Feature::ContextualLigatures,
* @relativeref{Feature,DiscretionaryLigatures},
* @relativeref{Feature,StandardLigatures}
*/
HistoricalLigatures = Utility::Endianness::fourCC('h', 'l', 'i', 'g'),
@ -1186,6 +1195,9 @@ enum class Feature: UnsignedInt {
* `liga`, [Standard Ligatures](https://learn.microsoft.com/typography/opentype/spec/features_ko#liga).
* Ligation and alternate feature intended for all scripts.
* @m_keywords{liga}
* @see @ref Feature::ContextualLigatures,
* @relativeref{Feature,DiscretionaryLigatures},
* @relativeref{Feature,HistoricalLigatures}
*/
StandardLigatures = Utility::Endianness::fourCC('l', 'i', 'g', 'a'),

2
src/MagnumPlugins/MagnumFont/Test/MagnumFontTest.cpp

@ -224,7 +224,7 @@ void MagnumFontTest::shaperReuse() {
2u, /* 'W' */
0u, /* 'a' (not found) */
0u, /* 'v' (not found) */
1u /* 'e' or 'ě' */
1u /* 'e' */
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(Containers::arrayView(offsets), Containers::arrayView<Vector2>({
{}, {}, {}, {}

Loading…
Cancel
Save