Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkClusterator.cpp File Reference
#include "src/pdf/SkClusterator.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkUTF.h"
#include "src/text/GlyphRun.h"

Go to the source code of this file.

Functions

static bool is_reversed (const uint32_t *clusters, uint32_t count)
 

Function Documentation

◆ is_reversed()

static bool is_reversed ( const uint32_t *  clusters,
uint32_t  count 
)
static

Definition at line 14 of file SkClusterator.cpp.

14 {
15 // "ReversedChars" is how PDF deals with RTL text.
16 // return true if more than one cluster and monotonicly decreasing to zero.
17 if (count < 2 || clusters[0] == 0 || clusters[count - 1] != 0) {
18 return false;
19 }
20 for (uint32_t i = 0; i + 1 < count; ++i) {
21 if (clusters[i + 1] > clusters[i]) {
22 return false;
23 }
24 }
25 return true;
26}
int count