Skip to content

Commit 5a54780

Browse files
committed
Clarify variables
1 parent f2abe50 commit 5a54780

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

hbjs.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ function hbjs(Module) {
99

1010
var freeFuncPtr = addFunction(function (ptr) { exports.free(ptr); }, 'vi');
1111

12-
const DONT_STOP = 0;
13-
const GSUB_PHASE = 1;
14-
const GPOS_PHASE = 2;
12+
const TRACE_PHASE_DONT_STOP = 0;
13+
const TRACE_PHASE_GSUB = 1;
14+
const TRACE_PHASE_GPOS = 2;
1515

1616
const STATIC_ARRAY_SIZE = 128
1717

@@ -1135,7 +1135,7 @@ function hbjs(Module) {
11351135
*/
11361136
function shapeWithTrace(font, buffer, features, stop_at, stop_phase) {
11371137
var trace = [];
1138-
var currentPhase = DONT_STOP;
1138+
var currentPhase = TRACE_PHASE_DONT_STOP;
11391139
var stopping = false;
11401140
var failure = false;
11411141

@@ -1145,17 +1145,17 @@ function hbjs(Module) {
11451145
var traceFunc = function (bufferPtr, fontPtr, messagePtr, user_data) {
11461146
var message = _utf8_ptr_to_string(messagePtr);
11471147
if (message.startsWith("start table GSUB"))
1148-
currentPhase = GSUB_PHASE;
1148+
currentPhase = TRACE_PHASE_GSUB;
11491149
else if (message.startsWith("start table GPOS"))
1150-
currentPhase = GPOS_PHASE;
1150+
currentPhase = TRACE_PHASE_GPOS;
11511151

11521152
if (currentPhase != stop_phase)
11531153
stopping = false;
11541154

11551155
if (failure)
11561156
return 1;
11571157

1158-
if (stop_phase != DONT_STOP && currentPhase == stop_phase && message.startsWith("end lookup " + stop_at))
1158+
if (stop_phase != TRACE_PHASE_DONT_STOP && currentPhase == stop_phase && message.startsWith("end lookup " + stop_at))
11591159
stopping = true;
11601160

11611161
if (stopping)

0 commit comments

Comments
 (0)