src/share/classes/sun/font/ScriptRun.java
Print this page
*** 119,158 ****
/**
* Get the starting index of the current script run.
*
* @return the index of the first character in the current script run.
*/
! public final int getScriptStart() {
return scriptStart;
}
/**
* Get the index of the first character after the current script run.
*
* @return the index of the first character after the current script run.
*/
! public final int getScriptLimit() {
return scriptLimit;
}
/**
* Get the script code for the script of the current script run.
*
* @return the script code for the script of the current script run.
* @see #Script
*/
! public final int getScriptCode() {
return scriptCode;
}
/**
* Find the next script run. Returns <code>false</code> if there
* isn't another run, returns <code>true</code> if there is.
*
* @return <code>false</code> if there isn't another run, <code>true</code> if there is.
*/
! public final boolean next() {
int startSP = parenSP; // used to find the first new open character
// if we've fallen off the end of the text, we're done
if (scriptLimit >= textLimit) {
return false;
--- 119,158 ----
/**
* Get the starting index of the current script run.
*
* @return the index of the first character in the current script run.
*/
! public int getScriptStart() {
return scriptStart;
}
/**
* Get the index of the first character after the current script run.
*
* @return the index of the first character after the current script run.
*/
! public int getScriptLimit() {
return scriptLimit;
}
/**
* Get the script code for the script of the current script run.
*
* @return the script code for the script of the current script run.
* @see #Script
*/
! public int getScriptCode() {
return scriptCode;
}
/**
* Find the next script run. Returns <code>false</code> if there
* isn't another run, returns <code>true</code> if there is.
*
* @return <code>false</code> if there isn't another run, <code>true</code> if there is.
*/
! public boolean next() {
int startSP = parenSP; // used to find the first new open character
// if we've fallen off the end of the text, we're done
if (scriptLimit >= textLimit) {
return false;
*** 240,250 ****
static final int LEAD_SURROGATE_SHIFT = 10;
static final int SURROGATE_OFFSET = SURROGATE_START - (LEAD_START << LEAD_SURROGATE_SHIFT) - TAIL_START;
static final int DONE = -1;
! private final int nextCodePoint() {
if (scriptLimit >= textLimit) {
return DONE;
}
int ch = text[scriptLimit++];
if (ch >= LEAD_START && ch < LEAD_LIMIT && scriptLimit < textLimit) {
--- 240,250 ----
static final int LEAD_SURROGATE_SHIFT = 10;
static final int SURROGATE_OFFSET = SURROGATE_START - (LEAD_START << LEAD_SURROGATE_SHIFT) - TAIL_START;
static final int DONE = -1;
! private int nextCodePoint() {
if (scriptLimit >= textLimit) {
return DONE;
}
int ch = text[scriptLimit++];
if (ch >= LEAD_START && ch < LEAD_LIMIT && scriptLimit < textLimit) {
*** 255,265 ****
}
}
return ch;
}
! private final void pushback(int ch) {
if (ch >= 0) {
if (ch >= 0x10000) {
scriptLimit -= 2;
} else {
scriptLimit -= 1;
--- 255,265 ----
}
}
return ch;
}
! private void pushback(int ch) {
if (ch >= 0) {
if (ch >= 0x10000) {
scriptLimit -= 2;
} else {
scriptLimit -= 1;
*** 285,295 ****
* the bits.
*
* @param n the word in which to find the highest bit that's set.
* @return the bit number (counting from the low order bit) of the highest bit.
*/
! private static final byte highBit(int n)
{
if (n <= 0) {
return -32;
}
--- 285,295 ----
* the bits.
*
* @param n the word in which to find the highest bit that's set.
* @return the bit number (counting from the low order bit) of the highest bit.
*/
! private static byte highBit(int n)
{
if (n <= 0) {
return -32;
}