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

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

?? type1font.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: Type1Font.java,v 1.34 2002/11/19 08:33:39 blowagie Exp $ * $Name:  $ * * Copyright 2001, 2002 Paulo Soares * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the License. * * The Original Code is 'iText, a free JAVA-PDF library'. * * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie. * All Rights Reserved. * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved. * * Contributor(s): all the names of the contributors are added in the source code * where applicable. * * Alternatively, the contents of this file may be used under the terms of the * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the * provisions of LGPL are applicable instead of those above.  If you wish to * allow use of your version of this file only under the terms of the LGPL * License and not to allow others to use your version of this file under * the MPL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the LGPL. * If you do not delete the provisions above, a recipient may use your version * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE. * * This library is free software; you can redistribute it and/or modify it * under the terms of the MPL as stated above or under the terms of the GNU * Library General Public License as published by the Free Software Foundation; * either version 2 of the License, or any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more * details. * * If you didn't download this code from the following link, you should check if * you aren't using an obsolete version: * http://www.lowagie.com/iText/ */package com.lowagie.text.pdf;import com.lowagie.text.ExceptionConverter;import com.lowagie.text.DocumentException;import java.util.HashMap;import java.util.ArrayList;import java.util.StringTokenizer;import java.io.*;/** Reads a Type1 font * * @author Paulo Soares (psoares@consiste.pt) */class Type1Font extends BaseFont{    /** The PFB file if the input was made with a <CODE>byte</CODE> array.     */        protected byte pfb[];/** The Postscript font name. */    private String FontName;/** The full name of the font. */    private String FullName;/** The family name of the font. */    private String FamilyName;/** The weight of the font: normal, bold, etc. */    private String Weight = "";/** The italic angle of the font, usually 0.0 or negative. */    private float ItalicAngle = 0.0f;/** <CODE>true</CODE> if all the characters have the same *  width. */    private boolean IsFixedPitch = false;/** The character set of the font. */    private String CharacterSet;/** The llx of the FontBox. */    private int llx = -50;/** The lly of the FontBox. */    private int lly = -200;/** The lurx of the FontBox. */    private int urx = 1000;/** The ury of the FontBox. */    private int ury = 900;/** The underline position. */    private int UnderlinePosition = -100;/** The underline thickness. */    private int UnderlineThickness = 50;/** The font's encoding name. This encoding is 'StandardEncoding' or *  'AdobeStandardEncoding' for a font that can be totally encoded *  according to the characters names. For all other names the *  font is treated as symbolic. */    private String EncodingScheme = "FontSpecific";/** A variable. */    private int CapHeight = 700;/** A variable. */    private int XHeight = 480;/** A variable. */    private int Ascender = 800;/** A variable. */    private int Descender = -200;/** A variable. */    private int StdHW;/** A variable. */    private int StdVW = 80;    /** Represents the section CharMetrics in the AFM file. Each *  element of this array contains a <CODE>Object[3]</CODE> with an *  Integer, Integer and String. This is the code, width and name. */    private ArrayList CharMetrics = new ArrayList();/** Represents the section KernPairs in the AFM file. The key is *  the name of the first character and the value is a <CODE>Object[]</CODE> *  with 2 elements for each kern pair. Position 0 is the name of *  the second character and position 1 is the kerning distance. This is *  repeated for all the pairs. */    private HashMap KernPairs = new HashMap();/** The file in use. */    private String fileName;/** <CODE>true</CODE> if this font is one of the 14 built in fonts. */    private boolean builtinFont = false;/** Types of records in a PFB file. ASCII is 1 and BINARY is 2. *  They have to appear in the PFB file in this sequence. */    private static final int pfbTypes[] = {1, 2, 1};        /** Creates a new Type1 font.     * @param ttfAfm the AFM file if the input is made with a <CODE>byte</CODE> array     * @param pfb the PFB file if the input is made with a <CODE>byte</CODE> array     * @param afmFile the name of one of the 14 built-in fonts or the location of an AFM file. The file must end in '.afm'     * @param enc the encoding to be applied to this font     * @param emb true if the font is to be embedded in the PDF     * @throws DocumentException the AFM file is invalid     * @throws IOException the AFM file could not be read     */    Type1Font(String afmFile, String enc, boolean emb, byte ttfAfm[], byte pfb[]) throws DocumentException, IOException    {        if (emb && ttfAfm != null && pfb == null)            throw new DocumentException("Two byte arrays are needed if the Type1 font is embedded.");        if (emb && ttfAfm != null)            this.pfb = pfb;        encoding = enc;        embedded = emb;        fileName = afmFile;        fontType = FONT_TYPE_T1;        RandomAccessFileOrArray rf = null;        InputStream is = null;        if (BuiltinFonts14.containsKey(afmFile)) {            embedded = false;            builtinFont = true;            byte buf[] = new byte[1024];            try {                is = getResourceStream(afmFile + ".afm");                if (is == null) {                    String msg = afmFile + " not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)";                    System.err.println(msg);                    throw new DocumentException(msg);                }                ByteArrayOutputStream out = new ByteArrayOutputStream();                while (true) {                    int size = is.read(buf);                    if (size < 0)                        break;                    out.write(buf, 0, size);                }                buf = out.toByteArray();            }            finally {                if (is != null) {                    try {                        is.close();                    }                    catch (Exception e) {                        // empty on purpose                    }                }            }            try {                rf = new RandomAccessFileOrArray(buf);                process(rf);            }            finally {                if (rf != null) {                    try {                        rf.close();                    }                    catch (Exception e) {                        // empty on purpose                    }                }            }        }        else if (afmFile.toLowerCase().endsWith(".afm")) {            try {                if (ttfAfm == null)                    rf = new RandomAccessFileOrArray(afmFile);                else                    rf = new RandomAccessFileOrArray(ttfAfm);                process(rf);            }            finally {                if (rf != null) {                    try {                        rf.close();                    }                    catch (Exception e) {                        // empty on purpose                    }                }            }        }        else            throw new DocumentException(afmFile + " is not an AFM font file.");        try {            EncodingScheme = EncodingScheme.trim();            if (EncodingScheme.equals("AdobeStandardEncoding") || EncodingScheme.equals("StandardEncoding")) {                fontSpecific = false;            }            " ".getBytes(enc); // check if the encoding exists            createEncoding();        }        catch (Exception e) {            throw new DocumentException(e.getMessage());        }    }    /** Gets the width from the font according to the <CODE>name</CODE> or, * if the <CODE>name</CODE> is null, meaning it is a symbolic font, * the char <CODE>c</CODE>. * @param c the char if the font is symbolic * @param name the glyph name * @return the width of the char */    protected int getRawWidth(int c, String name)    {        try {            if (name == null) { // font specific                for (int k = 0; k < CharMetrics.size(); ++k) {                    Object metrics[] = (Object[])CharMetrics.get(k);                    if (((Integer)(metrics[0])).intValue() == c)                        return ((Integer)(metrics[1])).intValue();                }            }            else {                if (name.equals(".notdef"))                    return 0;                for (int k = 0; k < CharMetrics.size(); ++k) {                    Object metrics[] = (Object[])CharMetrics.get(k);                    if (name.equals(metrics[2]))                        return ((Integer)(metrics[1])).intValue();                }            }        }        catch (Exception e) {            throw new ExceptionConverter(e);        }        return 0;    }    /** Gets the kerning between two Unicode characters. The characters * are converted to names and this names are used to find the kerning * pairs in the <CODE>HashMap</CODE> <CODE>KernPairs</CODE>. * @param char1 the first char * @param char2 the second char * @return the kerning to be applied */    public int getKerning(char char1, char char2)    {        String first = GlyphList.unicodeToName((int)char1);        if (first == null)            return 0;        String second = GlyphList.unicodeToName((int)char2);        if (second == null)            return 0;        Object obj[] = (Object[])KernPairs.get(first);        if (obj == null)            return 0;        for (int k = 0; k < obj.length; k += 2) {            if (second.equals(obj[k]))                return ((Integer)obj[k + 1]).intValue();        }        return 0;    }            /** Reads the font metrics     * @param rf the AFM file     * @throws DocumentException the AFM file is invalid     * @throws IOException the AFM file could not be read     */    public void process(RandomAccessFileOrArray rf) throws DocumentException, IOException    {        String line;        boolean isMetrics = false;        while ((line = rf.readLine()) != null)        {            StringTokenizer tok = new StringTokenizer(line);            if (!tok.hasMoreTokens())                continue;            String ident = tok.nextToken();            if (ident.equals("FontName"))                FontName = tok.nextToken("\u00ff").substring(1);            else if (ident.equals("FullName"))                FullName = tok.nextToken("\u00ff").substring(1);            else if (ident.equals("FamilyName"))                FamilyName = tok.nextToken("\u00ff").substring(1);            else if (ident.equals("Weight"))                Weight = tok.nextToken("\u00ff").substring(1);            else if (ident.equals("ItalicAngle"))                ItalicAngle = Float.valueOf(tok.nextToken()).floatValue();            else if (ident.equals("IsFixedPitch"))                IsFixedPitch = tok.nextToken().equals("true");            else if (ident.equals("CharacterSet"))                CharacterSet = tok.nextToken("\u00ff").substring(1);            else if (ident.equals("FontBBox"))            {                llx = (int)Float.valueOf(tok.nextToken()).floatValue();                lly = (int)Float.valueOf(tok.nextToken()).floatValue();                urx = (int)Float.valueOf(tok.nextToken()).floatValue();                ury = (int)Float.valueOf(tok.nextToken()).floatValue();            }            else if (ident.equals("UnderlinePosition"))                UnderlinePosition = (int)Float.valueOf(tok.nextToken()).floatValue();            else if (ident.equals("UnderlineThickness"))                UnderlineThickness = (int)Float.valueOf(tok.nextToken()).floatValue();            else if (ident.equals("EncodingScheme"))                EncodingScheme = tok.nextToken("\u00ff").substring(1);            else if (ident.equals("CapHeight"))                CapHeight = (int)Float.valueOf(tok.nextToken()).floatValue();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲福利社区一区| 视频在线观看一区| 日本女人一区二区三区| 91首页免费视频| 久久久久久综合| 日本一不卡视频| 在线免费观看日本欧美| 国产精品天干天干在线综合| 日韩av在线播放中文字幕| 99vv1com这只有精品| 国产午夜精品久久久久久久| 日韩高清国产一区在线| 欧美亚男人的天堂| 亚洲天堂久久久久久久| 国产91色综合久久免费分享| 欧美变态口味重另类| 日精品一区二区三区| 欧美三级欧美一级| 亚洲综合清纯丝袜自拍| 色噜噜狠狠色综合欧洲selulu| 亚洲国产精品99久久久久久久久| 国产成人福利片| 日韩一区二区三区电影在线观看| 亚洲国产精品自拍| 欧美绝品在线观看成人午夜影视| 亚洲激情在线播放| 91国内精品野花午夜精品| 亚洲欧美福利一区二区| 成人av在线看| 亚洲三级免费观看| 色综合视频一区二区三区高清| 亚洲婷婷综合色高清在线| 99re免费视频精品全部| 亚洲日本丝袜连裤袜办公室| 成人av在线一区二区三区| 中文字幕av不卡| 成人免费va视频| 中文字幕中文字幕在线一区| 99久久国产综合精品色伊| 亚洲女与黑人做爰| 日本精品视频一区二区三区| 最近中文字幕一区二区三区| aaa亚洲精品| 亚洲欧美成人一区二区三区| 91女神在线视频| 亚洲va欧美va天堂v国产综合| 欧美日本在线一区| 麻豆国产91在线播放| 国产亚洲福利社区一区| 成人99免费视频| 亚洲大片精品永久免费| 日韩精品一区二区三区中文精品| 老司机一区二区| 国产精品免费丝袜| 91黄色在线观看| 人人精品人人爱| 亚洲视频免费在线观看| 欧美日韩国产三级| 精品一区二区在线视频| 国产精品狼人久久影院观看方式| 一本一道波多野结衣一区二区| 日欧美一区二区| 国产精品久久久久精k8| 欧美日本韩国一区| 成人国产精品免费观看动漫| 亚洲一区二区三区在线| 精品盗摄一区二区三区| 99久久久久久99| 日本欧美一区二区三区乱码| 久久精品夜夜夜夜久久| 欧美吻胸吃奶大尺度电影 | 韩国精品免费视频| 亚洲欧美自拍偷拍色图| 欧美一级片免费看| 99国产一区二区三精品乱码| 美女精品自拍一二三四| 亚洲色图欧美激情| 国产亚洲精品7777| 69精品人人人人| 日本道免费精品一区二区三区| 韩国三级在线一区| 亚洲午夜精品17c| 国产精品欧美一区喷水| 日韩精品在线一区| 欧美精品第1页| 91色porny| 成人的网站免费观看| 九九视频精品免费| 免费成人在线观看视频| 麻豆91精品视频| 一区二区三区在线视频免费| 欧美韩国日本一区| 精品电影一区二区| 精品欧美乱码久久久久久1区2区| 欧美在线你懂得| 91传媒视频在线播放| 91免费国产在线观看| 成人黄动漫网站免费app| 国产精品资源网| 久久精品国产秦先生| 日韩和欧美的一区| 亚洲mv在线观看| 亚洲永久精品大片| 亚洲国产精品久久一线不卡| 一区二区三区免费看视频| 亚洲日本在线视频观看| 国产精品家庭影院| 亚洲欧美偷拍卡通变态| 亚洲欧洲一区二区在线播放| 国产精品欧美一级免费| 亚洲欧洲精品一区二区三区不卡| 国产精品青草久久| 亚洲色图视频网站| 夜夜爽夜夜爽精品视频| 亚洲国产精品天堂| 日本aⅴ免费视频一区二区三区| 五月天视频一区| 日韩精品一二区| 免费国产亚洲视频| 精品无码三级在线观看视频| 久久激情五月婷婷| 高潮精品一区videoshd| 99久久精品国产精品久久| 在线精品视频一区二区三四| 欧美日韩国产天堂| 精品久久久久久综合日本欧美| 久久久欧美精品sm网站| 亚洲天天做日日做天天谢日日欢 | 视频在线观看一区| 国精产品一区一区三区mba桃花| 国产乱子伦一区二区三区国色天香| 国产一区二区视频在线| 成av人片一区二区| 欧美日韩国产综合视频在线观看 | 国产曰批免费观看久久久| 成人在线综合网站| 欧美亚洲国产一区二区三区va | 激情丁香综合五月| 国产超碰在线一区| 在线观看一区二区精品视频| 6080午夜不卡| 国产精品免费观看视频| 亚洲成av人片在线观看无码| 狠狠网亚洲精品| 91亚洲精品久久久蜜桃| 欧美日本视频在线| 欧美—级在线免费片| 亚洲综合丁香婷婷六月香| 国产在线视频一区二区| 91丨porny丨首页| 精品久久久久久无| 亚洲综合男人的天堂| 国产传媒日韩欧美成人| 欧美欧美欧美欧美首页| 国产人久久人人人人爽| 婷婷成人综合网| 99精品国产热久久91蜜凸| 91精品国产综合久久小美女| 国产精品国产三级国产普通话三级| 午夜精品久久久久影视| 成人app网站| 久久婷婷一区二区三区| 亚洲成人激情综合网| 丁香另类激情小说| 91精品国产综合久久久久久久久久| 亚洲欧美自拍偷拍色图| 国产一区二区在线观看视频| 欧美日韩和欧美的一区二区| 日韩一区中文字幕| 国产成人免费高清| 日韩你懂的电影在线观看| 亚洲国产精品久久一线不卡| 99re热视频这里只精品| 国产欧美一区二区三区鸳鸯浴| 日韩精品亚洲一区二区三区免费| 一本色道综合亚洲| 亚洲欧美中日韩| 成人激情小说网站| 国产色产综合产在线视频| 麻豆一区二区三区| 欧美一卡二卡在线观看| 午夜精品影院在线观看| 欧美性欧美巨大黑白大战| 亚洲美女在线一区| 91麻豆福利精品推荐| 日韩一区在线免费观看| 99视频精品全部免费在线| 欧美激情艳妇裸体舞| 国产不卡视频在线播放| 国产视频在线观看一区二区三区| 久久精品国产99国产| 日韩美女在线视频| 卡一卡二国产精品| 欧美精品一区二区不卡| 久色婷婷小香蕉久久| 精品免费一区二区三区| 国内外精品视频| 欧美激情一区二区三区在线| 成人性生交大片免费看中文| 亚洲国产高清aⅴ视频|