Flutter Engine
The Flutter Engine
Functions
SkClusterator.cpp File Reference
#include "src/pdf/SkClusterator.h"
#include "include/core/SkSpan.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkTo.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 15 of file SkClusterator.cpp.

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