BFont: allow skipping fallbacks in GetHasGlyphs
Change-Id: I5a68008d25cce34596fb5ce6fb07259ae56c3a3d Reviewed-on: https://review.haiku-os.org/c/haiku/+/7829 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
36087e77db
commit
b8a45b3a2d
@@ -1740,12 +1740,18 @@
|
||||
/*!
|
||||
\fn void BFont::GetHasGlyphs(const char charArray[], int32 numChars,
|
||||
bool hasArray[]) const
|
||||
\brief Fills out \a hasArray with whether or not each characters in
|
||||
\a charArray has a glyph for the font.
|
||||
\brief Fills out \a hasArray with whether or not the font has a glyph
|
||||
for each character in \a charArray.
|
||||
|
||||
\c true is written in \a hasArray if the character has a glyph in the
|
||||
current font and \c false is written in \a hasArray if the character
|
||||
does NOT have a glyph in the current font.
|
||||
\c true is written in \a hasArray if a glyph is found for the character,
|
||||
\c false otherwise.
|
||||
|
||||
\remark After the introduction of fallback fonts for missing glyphs,
|
||||
this is not exaclty what the name or the original desciption imply. As
|
||||
the objective of this method is to know if a string can be presented
|
||||
to the user without getting "no glyph" symbols, it will still write
|
||||
\c true if the queried font does not provide a glyph for a character
|
||||
but a fallback font does.
|
||||
|
||||
\param charArray The source character array.
|
||||
\param numChars The number of characters to consider in \a charArray.
|
||||
@@ -1755,6 +1761,25 @@
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BFont::GetHasGlyphs(const char charArray[], int32 numChars,
|
||||
bool hasArray[], bool useFallbacks) const
|
||||
\brief Fills out \a hasArray with whether or not the font has a glyph
|
||||
for each character in \a charArray.
|
||||
|
||||
\c true is written in \a hasArray if the character has a glyph in the
|
||||
current font and \c false otherwise. Fallback fonts are also considered
|
||||
in the search if \a useFallbacks is \c true.
|
||||
|
||||
\param charArray The source character array.
|
||||
\param numChars The number of characters to consider in \a charArray.
|
||||
\param hasArray The destination array of booleans.
|
||||
\param useFallbacks Whether to consider fallback fonts in the answer.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn BFont& BFont::operator=(const BFont &font)
|
||||
\brief Assignment overload method.
|
||||
|
||||
Reference in New Issue
Block a user