jdk/src/java.desktop/share/classes/sun/font/FontRunIterator.java
changeset 26037 508779ce6619
parent 26004 7507a1b93f67
parent 25859 3317bb8137f4
equal deleted inserted replaced
25992:e9b05e933ddd 26037:508779ce6619
   138     static final int LEAD_SURROGATE_SHIFT = 10;
   138     static final int LEAD_SURROGATE_SHIFT = 10;
   139     static final int SURROGATE_OFFSET = SURROGATE_START - (LEAD_START << LEAD_SURROGATE_SHIFT) - TAIL_START;
   139     static final int SURROGATE_OFFSET = SURROGATE_START - (LEAD_START << LEAD_SURROGATE_SHIFT) - TAIL_START;
   140 
   140 
   141     static final int DONE = -1;
   141     static final int DONE = -1;
   142 
   142 
   143     final int nextCodePoint() {
   143     int nextCodePoint() {
   144         return nextCodePoint(limit);
   144         return nextCodePoint(limit);
   145     }
   145     }
   146 
   146 
   147     final int nextCodePoint(int lim) {
   147     int nextCodePoint(int lim) {
   148         if (pos >= lim) {
   148         if (pos >= lim) {
   149             return DONE;
   149             return DONE;
   150         }
   150         }
   151         int ch = text[pos++];
   151         int ch = text[pos++];
   152         if (ch >= LEAD_START && ch < LEAD_LIMIT && pos < lim) {
   152         if (ch >= LEAD_START && ch < LEAD_LIMIT && pos < lim) {
   157             }
   157             }
   158         }
   158         }
   159         return ch;
   159         return ch;
   160     }
   160     }
   161 
   161 
   162     final void pushback(int ch) {
   162     void pushback(int ch) {
   163         if (ch >= 0) {
   163         if (ch >= 0) {
   164             if (ch >= 0x10000) {
   164             if (ch >= 0x10000) {
   165                 pos -= 2;
   165                 pos -= 2;
   166             } else {
   166             } else {
   167                 pos -= 1;
   167                 pos -= 1;