If this font file is using the Compact Font File Format, then this method
will return the raw bytes needed for the font stream. If this method is
ever made public: make sure to add a test if (cff == true).
@return	a byte array
@since	2.1.3
483857
protected byte[] readCffFont() throws IOException {
        RandomAccessFileOrArray rf2 = new RandomAccessFileOrArray(rf);
        byte b[] = new byte[cffLength];
        try {
            rf2.reOpen();
            rf2.seek(cffOffset);
            rf2.readFully(b);
        }
        finally {
            try {
                rf2.close();
            }
            catch (Exception e) {
                // empty on purpose
            }
        }
    	return b;
    }
429669
public double getMedianFontsize() {
    if (DocumentElement_Type.featOkTst && ((DocumentElement_Type)jcasType).casFeat_medianFontsize == null)
      jcasType.jcas.throwFeatMissing("medianFontsize", "ch.epfl.bbp.uima.types.DocumentElement");
    return jcasType.ll_cas.ll_getDoubleValue(addr, ((DocumentElement_Type)jcasType).casFeatCode_medianFontsize);}
311219
protected byte[] getBytesInternal() {
		byte cached[];
		if(hasNoValueCache() || (cached = valueCache.lowerBytes) == null) {
			valueCache.lowerBytes = cached = getBytesImpl(true);
		}
		return cached;
	}
608508
public String encode() throws IOException {
        FastStringWriter fsw = new FastStringWriter();

        try {
            fsw.write("{");

            ChartUtils.writeDataValue(fsw, "fontSize", this.fontSize, false);
            ChartUtils.writeDataValue(fsw, "fontColor", this.fontColor, true);
            ChartUtils.writeDataValue(fsw, "fontFamily", this.fontFamily, true);
            ChartUtils.writeDataValue(fsw, "fontStyle", this.fontStyle, true);

            fsw.write("}");
        }
        finally {
            fsw.close();
        }

        return fsw.toString();
    }
104256
public byte[] getBytesF() {
		final int len = getInt();
		final byte[] bytes = new byte[len];
		System.arraycopy(buf, bufPosition, bytes, 0, bytes.length);
		bufPosition += bytes.length;
		return bytes;
	}
671304
public static FontData[] getAllFonts() {
		if (fonts == null) {
			fonts = new ArrayList();
			
			String os = System.getProperty("os.name");
			File[] locs = new File[0];
			
			if (os.startsWith("Windows")) {
				locs = win32;
			}
			if (os.startsWith("Linux")) {
				locs = linux;
			}
			if (os.startsWith("Mac OS")) {
				locs = macos;
			}
			
			for (int i=0;i<locs.length;i++) {
				File loc = locs[i];
			
				processFontDirectory(loc, fonts);
			}

			if (os.startsWith("Linux")) {
				locateLinuxFonts(new File("/etc/fonts/fonts.conf"));
			}
		}
		
		
		return (FontData[]) fonts.toArray(new FontData[0]);
	}
458945
public byte[] getBytes() {
        byte[] retval = new byte[buffer.b().position()];
        int position = buffer.b().position();
        buffer.b().rewind();
        buffer.b().get(retval);
        assert position == buffer.b().position();
        return retval;
    }
659786
public Font getTextFont(byte field) {
		FieldInfos fi = getFieldInfos(field);
		Vector v = new Vector(m_defaultTextFontFamilyNames.length+fi.m_fontFamilyNames.length);
        Collections.addAll(v, fi.m_fontFamilyNames);
        Collections.addAll(v, m_defaultTextFontFamilyNames);
		Iterator it = v.iterator();
		Font font = null;
		String s = "";
		int style = getTextStyle(field);
		int size = (int) getTextSize(field);
		while (it.hasNext()) {
			String fontName = (String) it.next();
			if (s.length() > 0)
				s += ", ";
			s += fontName;
			if (isFontAvailable(fontName)) {
				font = new Font(fontName, style, size);
				break;
			}
		}
		if (font == null) {
			System.err.println("None of these fonts are available: " + s);
			font = new Font("Dialog", style, size);
		}
		if (fi.m_textAttributes != null) {
			font = font.deriveFont(fi.m_textAttributes);
		}
		return font;
	}
185449
public byte[] getBytes()
	{
		byte[] b = new byte[size];
		int bytesCopied = 0;

		System.arraycopy(Helpers.convertIntToDWord(size), 0, b, bytesCopied, 4);
		bytesCopied += 4;
		b[bytesCopied++] = (byte) numFlagBytes;
		System.arraycopy(getFlagBytes(), 0, b, bytesCopied, numFlagBytes);
		bytesCopied += numFlagBytes;

		return b;
	}
1227916
public String read(FontFileReader in) throws IOException {
        tag[0] = in.readTTFByte();
        tag[1] = in.readTTFByte();
        tag[2] = in.readTTFByte();
        tag[3] = in.readTTFByte();

        in.skip(4);    // Skip checksum

        offset = in.readTTFULong();
        length = in.readTTFULong();
        String tagStr = new String(tag, "ISO-8859-1");

        return tagStr;
    }
677888
public byte[] getBytes()
	{
		byte b[] = new byte[getLength()];
		int bytesCopied = 0;

		Iterator<V> it = this.values().iterator();
		while (it.hasNext())
		{
			ID3v2Frame frame = (ID3v2Frame) it.next();
			System.arraycopy(frame.getFrameBytes(), 0, b, bytesCopied, frame.getFrameLength());
			bytesCopied += frame.getFrameLength();
		}

		return b;
	}
938309
def raw(mime='application/octet-stream'):
    '''
    
    '''
    def dfn(fn):
        tags = getattr(fn, 'tags', set())
        tags.add('raw')
        fn.tags = tags
        fn.mime = getattr(fn, 'mime', mime)
        return fn
    return dfn
906993
public byte[] Process(String fontName)throws IOException{
		try
		{	
			// Verify that the file is open
			buf.reOpen();
			// Find the Font that we will be dealing with
			int j;
	        for (j=0; j<fonts.length; j++)
	            if (fontName.equals(fonts[j].name)) break;
	        if (j==fonts.length) return null;
	        
			// Calc the bias for the global subrs
			if (gsubrIndexOffset >= 0)
				GBias = CalcBias(gsubrIndexOffset,j);

	        // Prepare the new CharStrings Index
			BuildNewCharString(j);
			 // Prepare the new Global and Local Subrs Indices
			BuildNewLGSubrs(j);
			// Build the new file 
			byte[] Ret = BuildNewFile(j);
			return Ret;
		}
		finally {
            try {
                buf.close();
            }
            catch (Exception e) {
                // empty on purpose
            }
		}
	}
1184118
public ByteBuffer getByteBuffer() {
		final ByteBuffer bb = ByteBuffer.wrap(buf);
		bb.limit(bufLimit);
		bb.position(bufPosition);
		return bb;
	}
665374
public int[] getFontBBox() {
        final int[] fbb = new int[4];
        fbb[0] = fontBBox1;
        fbb[1] = fontBBox2;
        fbb[2] = fontBBox3;
        fbb[3] = fontBBox4;

        return fbb;
    }
974221
public char[] getJWT() {
        try {
            char[] jwtChars = null;
            String fileToUse = this.jwtFile;

            if (this.chainFile != null) {
                fileToUse = this.chainFile;
            }

            byte[] data = Files.readAllBytes(Paths.get(fileToUse));
            ByteBuffer bb = ByteBuffer.wrap(data);
            CharBuffer chars = StandardCharsets.UTF_8.decode(bb);
            jwtChars = this.extract(chars, 1); // jwt is always first
            // Clear things up as best we can
            chars.clear();
            for (int i=0; i<chars.capacity();i++) {
                chars.put('\0');
            }
            bb.clear();
            for (int i=0;i<data.length;i++) {
                data[i] = 0;
            }

            return jwtChars;
        } catch (Exception exp) {
            throw new IllegalStateException("problem reading jwt", exp);
        }
    }
529523
protected FontStyle getFontStyle(byte[] data, int offset, Map<Integer, FontBase> fontBases, boolean ignoreBackground)
   {
      //System.out.println(ByteArrayHelper.hexdump(data, offset, 32, false));

      Integer index = Integer.valueOf(MPPUtility.getByte(data, offset));
      FontBase fontBase = fontBases.get(index);
      int style = MPPUtility.getByte(data, offset + 3);
      Color color = MPPUtility.getColor(data, offset + 4);
      Color backgroundColor;
      BackgroundPattern backgroundPattern;

      if (ignoreBackground)
      {
         backgroundColor = null;
         backgroundPattern = BackgroundPattern.SOLID;
      }
      else
      {
         backgroundColor = MPPUtility.getColor(data, offset + 16);
         backgroundPattern = BackgroundPattern.getInstance(MPPUtility.getShort(data, offset + 28));
      }

      boolean bold = ((style & 0x01) != 0);
      boolean italic = ((style & 0x02) != 0);
      boolean underline = ((style & 0x04) != 0);
      boolean strikethrough = ((style & 0x08) != 0);

      FontStyle fontStyle = new FontStyle(fontBase, italic, bold, underline, strikethrough, color, backgroundColor, backgroundPattern);
      //System.out.println(fontStyle);
      return fontStyle;
   }