usp10: pwLogClust is ordered so its max will be on one end.
This commit is contained in:
parent
1967fae847
commit
2ab625bf2f
|
@ -2309,16 +2309,14 @@ static inline int get_cluster_size(const WORD *pwLogClust, int cChars, int item,
|
||||||
static inline int get_glyph_cluster_advance(const int* piAdvance, const SCRIPT_VISATTR *pva, const WORD *pwLogClust, int cGlyphs, int cChars, int glyph, int direction)
|
static inline int get_glyph_cluster_advance(const int* piAdvance, const SCRIPT_VISATTR *pva, const WORD *pwLogClust, int cGlyphs, int cChars, int glyph, int direction)
|
||||||
{
|
{
|
||||||
int advance;
|
int advance;
|
||||||
int log_clust_max = 0;
|
int log_clust_max;
|
||||||
int i;
|
|
||||||
|
|
||||||
advance = piAdvance[glyph];
|
advance = piAdvance[glyph];
|
||||||
|
|
||||||
for (i = 0; i < cChars; i++)
|
if (pwLogClust[0] > pwLogClust[cChars-1])
|
||||||
{
|
log_clust_max = pwLogClust[0];
|
||||||
if (pwLogClust[i] > log_clust_max)
|
else
|
||||||
log_clust_max = pwLogClust[i];
|
log_clust_max = pwLogClust[cChars-1];
|
||||||
}
|
|
||||||
|
|
||||||
if (glyph > log_clust_max)
|
if (glyph > log_clust_max)
|
||||||
return advance;
|
return advance;
|
||||||
|
|
Loading…
Reference in New Issue