| 632 | |
| 633 | |
| 634 | protected int indexActual(char c) { |
| 635 | // degenerate case, but the find function will have trouble |
| 636 | // if there are somehow zero chars in the lookup |
| 637 | //if (value.length == 0) return -1; |
| 638 | if (glyphCount == 0) return -1; |
| 639 | |
| 640 | // quicker lookup for the ascii fellers |
| 641 | if (c < 128) return ascii[c]; |
| 642 | |
| 643 | // some other unicode char, hunt it out |
| 644 | //return index_hunt(c, 0, value.length-1); |
| 645 | return indexHunt(c, 0, glyphCount-1); |
| 646 | } |
| 647 | |
| 648 | |
| 649 | protected int indexHunt(int c, int start, int stop) { |