亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? arabicshaping.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                    length = w - start;                } else { // spaces at beginning                    while (w < e) {                        dest[w++] = '\u0020';                    }                }            }        }        return length;    }    /*     * Name    : expandLamAlef     * Function: LamAlef needs special handling as the LamAlef is     *           one character while expanding it will give two     *           characters Lam + Alef, so we need to expand the LamAlef     *           in near or far spaces according to the options the user     *           specifies or increase the buffer size.     *           Dest has enough room for the expansion if we are growing.     *           lamalef are normalized to the 'special characters'     */    private int expandLamAlef(char[] dest,                              int start,                              int length,                              int lacount) {        int lenOptions = options & LENGTH_MASK;        if (!isLogical) {            switch (lenOptions) {            case LENGTH_FIXED_SPACES_AT_BEGINNING: lenOptions = LENGTH_FIXED_SPACES_AT_END; break;            case LENGTH_FIXED_SPACES_AT_END: lenOptions = LENGTH_FIXED_SPACES_AT_BEGINNING; break;            default: break;            }        }        switch (lenOptions) {        case LENGTH_GROW_SHRINK:             {                for (int r = start + length, w = r + lacount; --r >= start;) {                    char ch = dest[r];                    if (isNormalizedLamAlefChar(ch)) {                        dest[--w] = '\u0644';                        dest[--w] = convertNormalizedLamAlef[ch - '\u065C'];                    } else {                        dest[--w] = ch;                    }                }            }            length += lacount;            break;        case LENGTH_FIXED_SPACES_NEAR:             {                if (isNormalizedLamAlefChar(dest[start])) {                    throw new RuntimeException("no space for lamalef");                }                for (int i = start + length; --i > start;) { // don't check start, already checked                    char ch = dest[i];                    if (isNormalizedLamAlefChar(ch)) {                        if (dest[i-1] == '\u0020') {                            dest[i] = '\u0644';                            dest[--i] = convertNormalizedLamAlef[ch - '\u065C'];                        } else {                            throw new RuntimeException("no space for lamalef");                        }                    }                }            }            break;        case LENGTH_FIXED_SPACES_AT_END:             {                if (lacount > countSpacesLeft(dest, start, length)) {                    throw new RuntimeException("no space for lamalef");                }                for (int r = start + lacount, w = start, e = start + length; r < e; ++r) {                    char ch = dest[r];                    if (isNormalizedLamAlefChar(ch)) {                        dest[w++] = convertNormalizedLamAlef[ch - '\u065C'];                        dest[w++] = '\u0644';                    } else {                        dest[w++] = ch;                    }                }            }            break;                        case LENGTH_FIXED_SPACES_AT_BEGINNING:             {                if (lacount > countSpacesRight(dest, start, length)) {                    throw new RuntimeException("no space for lamalef");                }                for (int r = start + length - lacount, w = start + length; --r >= start;) {                    char ch = dest[r];                    if (isNormalizedLamAlefChar(ch)) {                        dest[--w] = '\u0644';                        dest[--w] = convertNormalizedLamAlef[ch - '\u065C'];                    } else {                        dest[--w] = ch;                    }                }            }            break;        }        return length;    }    /* Convert the input buffer from FExx Range into 06xx Range     * to put all characters into the 06xx range     * even the lamalef is converted to the special region in     * the 06xx range.  Return the number of lamalef chars found.     */    private int normalize(char[] dest, int start, int length) {        int lacount = 0;        for (int i = start, e = i + length; i < e; ++i) {            char ch = dest[i];            if (ch >= '\uFE70' && ch <= '\uFEFC') {                if (isLamAlefChar(ch)) {                    ++lacount;                }                dest[i] = (char)convertFEto06[ch - '\uFE70'];            }        }        return lacount;    }    /*     * Name    : shapeUnicode     * Function: Converts an Arabic Unicode buffer in 06xx Range into a shaped     *           arabic Unicode buffer in FExx Range     */    private int shapeUnicode(char[] dest,                              int start,                             int length,                             int destSize,                             int tashkeelFlag) {        normalize(dest, start, length);        // resolve the link between the characters.        // Arabic characters have four forms: Isolated, Initial, Medial and Final.        // Tashkeel characters have two, isolated or medial, and sometimes only isolated.        // tashkeelFlag == 0: shape normally, 1: shape isolated, 2: don't shape        boolean lamalef_found = false;        int i = start + length - 1;        int currLink = getLink(dest[i]);        int nextLink = 0;        int prevLink = 0;        int lastLink = 0;        int prevPos = i;        int lastPos = i;        int nx = -2;        int nw = 0;        while (i >= 0) {            // If high byte of currLink > 0 then there might be more than one shape            if ((currLink & '\uFF00') > 0 || isTashkeelChar(dest[i])) {                nw = i - 1;                nx = -2;                while (nx < 0) { // we need to know about next char                    if (nw == -1) {                        nextLink = 0;                        nx = Integer.MAX_VALUE;                    } else {                        nextLink = getLink(dest[nw]);                        if ((nextLink & IRRELEVANT) == 0) {                            nx = nw;                        } else {                            --nw;                        }                    }                }                if (((currLink & ALEFTYPE) > 0) && ((lastLink & LAMTYPE) > 0)) {                    lamalef_found = true;                     char wLamalef = changeLamAlef(dest[i]); // get from 0x065C-0x065f                    if (wLamalef != '\u0000') {                        // replace alef by marker, it will be removed later                        dest[i] = '\uffff';                        dest[lastPos] = wLamalef;                        i = lastPos;                    }                    lastLink = prevLink;                    currLink = getLink(wLamalef); // requires '\u0000', unfortunately                }                // get the proper shape according to link ability of neighbors                // and of character; depends on the order of the shapes                // (isolated, initial, middle, final) in the compatibility area                int flag = specialChar(dest[i]);                int shape = shapeTable[nextLink & LINK_MASK]                    [lastLink & LINK_MASK]                    [currLink & LINK_MASK];                if (flag == 1) {                    shape &= 0x1;                } else if (flag == 2) {                    if (tashkeelFlag == 0 &&                        ((lastLink & LINKL) != 0) &&                         ((nextLink & LINKR) != 0) &&                         dest[i] != '\u064C' &&                         dest[i] != '\u064D' &&                        !((nextLink & ALEFTYPE) == ALEFTYPE &&                           (lastLink & LAMTYPE) == LAMTYPE)) {		                        shape = 1;                    } else {                        shape = 0;                    }                }                if (flag == 2) {                    if (tashkeelFlag < 2) {                        dest[i] = (char)('\uFE70' + irrelevantPos[dest[i] - '\u064B'] + shape);                    } // else leave tashkeel alone                                    } else {                    dest[i] = (char)('\uFE70' + (currLink >> 8) + shape);                }            }            // move one notch forward            if ((currLink & IRRELEVANT) == 0) {                prevLink = lastLink;                lastLink = currLink;                prevPos = lastPos;                lastPos = i;            }            --i;            if (i == nx) {                currLink = nextLink;                nx = -2;            } else if (i != -1) {                currLink = getLink(dest[i]);            }        }        // If we found a lam/alef pair in the buffer         // call removeLamAlefSpaces to remove the spaces that were added        if (lamalef_found) {            destSize = removeLamAlefSpaces(dest, start, length);        } else {            destSize = length;        }                return destSize;    }    /*     * Name    : deShapeUnicode     * Function: Converts an Arabic Unicode buffer in FExx Range into unshaped     *           arabic Unicode buffer in 06xx Range     */    private int deShapeUnicode(char[] dest,                                int start,                               int length,                               int destSize) {        int lamalef_count = normalize(dest, start, length);        // If there was a lamalef in the buffer call expandLamAlef        if (lamalef_count != 0) {            // need to adjust dest to fit expanded buffer... !!!            destSize = expandLamAlef(dest, start, length, lamalef_count);        } else {            destSize = length;        }        return destSize;    }    private int internalShape(char[] source,                               int sourceStart,                              int sourceLength,                              char[] dest,                              int destStart,                              int destSize) {        if (sourceLength == 0) {            return 0;        }        if (destSize == 0) {            if (((options & LETTERS_MASK) != LETTERS_NOOP) &&                ((options & LENGTH_MASK) == LENGTH_GROW_SHRINK)) {	                return calculateSize(source, sourceStart, sourceLength);            } else {                return sourceLength; // by definition            }        }        // always use temp buffer        char[] temp = new char[sourceLength * 2]; // all lamalefs requiring expansion        System.arraycopy(source, sourceStart, temp, 0, sourceLength);        if (isLogical) {            invertBuffer(temp, 0, sourceLength);        }        int outputSize = sourceLength;        switch (options & LETTERS_MASK) {        case LETTERS_SHAPE_TASHKEEL_ISOLATED:            outputSize = shapeUnicode(temp, 0, sourceLength, destSize, 1);            break;        case LETTERS_SHAPE:            outputSize = shapeUnicode(temp, 0, sourceLength, destSize, 0);            break;        case LETTERS_UNSHAPE:            outputSize = deShapeUnicode(temp, 0, sourceLength, destSize);            break;         default:            break;        }                        if (outputSize > destSize) {            throw new RuntimeException("not enough room for result data");        }        if ((options & DIGITS_MASK) != DIGITS_NOOP) {            char digitBase = '\u0030'; // European digits            switch (options & DIGIT_TYPE_MASK) {            case DIGIT_TYPE_AN:                digitBase = '\u0660';  // Arabic-Indic digits                break;            case DIGIT_TYPE_AN_EXTENDED:                digitBase = '\u06f0';  // Eastern Arabic-Indic digits (Persian and Urdu)                break;            default:                break;            }            switch (options & DIGITS_MASK) {            case DIGITS_EN2AN:                {                    int digitDelta = digitBase - '\u0030';                    for (int i = 0; i < outputSize; ++i) {                        char ch = temp[i];                        if (ch <= '\u0039' && ch >= '\u0030') {                            temp[i] += digitDelta;                        }                    }                }                break;            case DIGITS_AN2EN:                {                    char digitTop = (char)(digitBase + 9);                    int digitDelta = '\u0030' - digitBase;                    for (int i = 0; i < outputSize; ++i) {                        char ch = temp[i];                        if (ch <= digitTop && ch >= digitBase) {                            temp[i] += digitDelta;                        }                    }                }                break;            case DIGITS_EN2AN_INIT_LR:                shapeToArabicDigitsWithContext(temp, 0, outputSize, digitBase, false);                break;            case DIGITS_EN2AN_INIT_AL:                shapeToArabicDigitsWithContext(temp, 0, outputSize, digitBase, true);                break;            default:                break;            }        }        if (isLogical) {            invertBuffer(temp, 0, outputSize);        }              System.arraycopy(temp, 0, dest, destStart, outputSize);              return outputSize;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久三区| 久久99精品久久久久久国产越南 | 国产精品护士白丝一区av| 中文字幕中文字幕在线一区| 亚洲一区二区五区| 日本不卡视频在线| 成人性视频网站| 日本韩国欧美在线| 欧美精品少妇一区二区三区| 精品精品国产高清a毛片牛牛| 国产免费观看久久| 亚洲成人中文在线| 国产一区二区三区国产| 91久久人澡人人添人人爽欧美| 欧美丰满美乳xxx高潮www| 欧美国产日韩亚洲一区| 日韩av电影免费观看高清完整版| 国产激情偷乱视频一区二区三区| 99国产精品久久久久久久久久 | 奇米精品一区二区三区四区| 国产精品一区二区黑丝| 欧美日韩mp4| 久久先锋影音av| 亚洲丝袜另类动漫二区| 国产一级精品在线| 欧美一区日本一区韩国一区| 亚洲欧美国产毛片在线| 国产成人免费在线| 欧美一区二区三区的| 亚洲精品免费电影| a在线欧美一区| 久久综合999| 蜜桃免费网站一区二区三区| 色成年激情久久综合| 国产精品免费aⅴ片在线观看| 免费观看成人av| 欧美日韩一区在线| 亚洲精品中文在线影院| 成人午夜免费电影| 久久久精品tv| 韩国av一区二区| 欧美一级艳片视频免费观看| 亚洲成人免费电影| 欧美午夜视频网站| 一区二区三区四区五区视频在线观看 | 欧美国产欧美亚州国产日韩mv天天看完整| 亚洲国产精品久久一线不卡| 91成人免费电影| 亚洲另类在线制服丝袜| 91美女视频网站| 中文字幕制服丝袜成人av| 国产成人精品1024| 国产目拍亚洲精品99久久精品| 极品美女销魂一区二区三区| 日韩一级视频免费观看在线| 日本强好片久久久久久aaa| 91麻豆精品国产91久久久更新时间 | 51精品秘密在线观看| 亚洲亚洲精品在线观看| 欧美日韩高清影院| 日韩理论电影院| 91在线看国产| 亚洲欧美影音先锋| 成人毛片老司机大片| 亚洲三级理论片| 欧美揉bbbbb揉bbbbb| 青青草国产精品97视觉盛宴| 精品噜噜噜噜久久久久久久久试看| 国产综合久久久久影院| 欧美激情综合网| 色素色在线综合| 午夜精品视频一区| 日韩视频一区二区三区在线播放| 久久精品国产免费| 中文字幕视频一区二区三区久| 色婷婷综合久久久久中文| 亚洲成a人片综合在线| 91精品国产91久久久久久最新毛片| 精品一区二区三区免费观看| 亚洲国产精品传媒在线观看| 91国在线观看| 麻豆精品国产传媒mv男同| 国产精品污污网站在线观看| 91黄色免费版| 激情图区综合网| 日韩理论片中文av| 欧美大片一区二区三区| 成人精品亚洲人成在线| 午夜精品久久久久久久久久久 | 91精品国产免费久久综合| 韩国女主播一区| 亚洲欧洲一区二区三区| 欧美老肥妇做.爰bbww| 国产乱码精品一区二区三| 亚洲一区二区三区在线| 久久综合色8888| 欧美三区免费完整视频在线观看| 亚洲一区二区三区四区五区黄| 欧美日韩国产综合久久| av亚洲精华国产精华| 奇米色一区二区| 国产精品你懂的在线| 精品国产伦一区二区三区观看方式| 91浏览器打开| 国产传媒欧美日韩成人| 日本不卡高清视频| 一级中文字幕一区二区| 日本一区二区三区免费乱视频| 欧美人与禽zozo性伦| 99r国产精品| 国产a精品视频| 青青草97国产精品免费观看无弹窗版 | 99国产精品视频免费观看| 国产一区在线视频| 久久精品国产免费| 亚洲视频香蕉人妖| 久久精品视频网| 欧美日韩激情一区二区| 日本高清成人免费播放| 成人激情黄色小说| 奇米888四色在线精品| 亚洲精品伦理在线| 国产精品久久久久影视| 久久久精品国产99久久精品芒果| 欧美一区永久视频免费观看| 欧美午夜精品免费| 91在线播放网址| 国产白丝网站精品污在线入口| 首页欧美精品中文字幕| 亚洲成人免费视频| 天堂精品中文字幕在线| 亚洲国产欧美在线人成| 亚洲在线视频网站| 亚洲高清视频在线| 午夜国产不卡在线观看视频| 亚洲精品成人在线| 亚洲综合一区二区三区| 艳妇臀荡乳欲伦亚洲一区| 一区二区三区鲁丝不卡| 亚洲国产视频一区二区| 日韩在线一二三区| 蜜臀va亚洲va欧美va天堂| 精品一区二区综合| 精品一区二区免费视频| 狠狠色综合播放一区二区| 国产一区二区三区四| 东方aⅴ免费观看久久av| 成人污视频在线观看| 91偷拍与自偷拍精品| 91国偷自产一区二区开放时间 | 综合婷婷亚洲小说| 亚洲免费在线观看| 五月综合激情婷婷六月色窝| 日韩电影网1区2区| 国产麻豆视频精品| www.久久久久久久久| 欧美综合欧美视频| 这里只有精品视频在线观看| 日韩精品中文字幕一区| 欧美日韩一区二区不卡| 日韩一区二区在线免费观看| 欧美成人性战久久| 久久精品视频一区二区| 久久综合九色综合欧美98 | 午夜精品久久久久久久| 美女一区二区三区| 高潮精品一区videoshd| 欧美日韩在线精品一区二区三区激情| 日韩午夜中文字幕| 国产喷白浆一区二区三区| 夜夜嗨av一区二区三区网页 | 成人不卡免费av| 欧美日韩午夜在线| 国产日产欧产精品推荐色| 一区二区成人在线| 国产乱码精品一品二品| 成人app网站| 欧美人妇做爰xxxⅹ性高电影| 日韩久久精品一区| 亚洲人123区| 国产精品一区二区果冻传媒| 91福利精品视频| 国产午夜精品福利| 婷婷久久综合九色综合伊人色| 东方aⅴ免费观看久久av| 久久免费视频色| 国产最新精品免费| 欧美岛国在线观看| 麻豆精品视频在线观看免费| 91麻豆精品国产无毒不卡在线观看 | 最新国产成人在线观看| 国产成人aaaa| 久久女同互慰一区二区三区| 精品系列免费在线观看| 777奇米成人网| 美女mm1313爽爽久久久蜜臀| 91精品国产福利| 久久超碰97中文字幕| 26uuu久久天堂性欧美| 国产麻豆一精品一av一免费|