1 package org.skia.androidkit; 2 3 public abstract class FontChain { 4 long mNativeAdapter; 5 FontChain()6 FontChain() { 7 mNativeAdapter = nCreate(this); 8 } 9 10 /** 11 * Releases any resources associated with this FontChain. 12 */ release()13 public void release() { 14 nRelease(mNativeAdapter); 15 mNativeAdapter = 0; 16 } 17 18 @Override finalize()19 protected void finalize() throws Throwable { 20 release(); 21 } 22 count()23 abstract int count(); getAt(int i)24 abstract long getAt(int i); fontSize()25 abstract float fontSize(); locale()26 abstract String locale(); 27 nCreate(FontChain fontChain)28 private static native long nCreate(FontChain fontChain); nRelease(long nativeInstance)29 private static native void nRelease(long nativeInstance); 30 } 31