libisfreetype-java-5.3.20100629/0000755000175000017500000000000011412336226016006 5ustar twernertwernerlibisfreetype-java-5.3.20100629/lib/0000755000175000017500000000000011412336226016554 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/0000755000175000017500000000000011412336226016575 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/overview.html0000644000175000017500000000636111055262042021334 0ustar twernertwerner This library wraps the well known FreeType font management library to be used from within Java. The FreeType binaries for the windows platform are included as a self extracting component. On the other platforms we currently assume that there's already a working installation of FreeType available.

Content

  1. Installation
  2. Overview
  3. License
  4. Service and support

Installation

To use this implementation, you have to include the jar files in the "lib" directory in your classpath.

Overview

License

This library is released under a BSD style license. The license is included with the sources and at numerous other places, for example here:
/*
 * Copyright (c) 2007, intarsys consulting GmbH
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 *   this list of conditions and the following disclaimer.
 *
 * - Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * - Neither the name of intarsys nor the names of its contributors may be used
 *   to endorse or promote products derived from this software without specific
 *   prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
As far as we need 3rd party components, the respective licenses are included in the "3rd_party_licenses" directory.

Service & Support

More information about this component you will find at http://opensource.intarsys.de If you need further support, feel free to contact us. intarsys consulting GmbH
Bahnhofplatz 8
76137 Karlsruhe
Fon +49 721 38479-0
Fax +49 721 38479-60
info@intarsys.de
www.intarsys.de

For service and support contact

  1. EMail support: support@intarsys.de
libisfreetype-java-5.3.20100629/src/de/0000755000175000017500000000000011412336226017165 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/de/intarsys/0000755000175000017500000000000011412336226021041 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/de/intarsys/cwt/0000755000175000017500000000000011412336226021636 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/0000755000175000017500000000000011412336226023461 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/CharMap.java0000644000175000017500000000463411412327632025647 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTCharMap; import de.intarsys.cwt.freetype.nativec._FTNI; public class CharMap { public static CharMap create(_FTNI ftni, FTCharMap ftCharMap) { if (ftCharMap == null || ftCharMap.isNull()) { return null; } return new CharMap(ftni, ftCharMap); } private FTCharMap charMap; protected CharMap(_FTNI ftni, FTCharMap paramCharMap) { charMap = paramCharMap; } protected FTCharMap getCharMap() { return charMap; } public int getEncodingID() { return charMap.getEncodingId(); } public int getPlatformID() { return charMap.getPlatformId(); } public boolean isMacintoshRoman() { return getPlatformID() == 1 && getEncodingID() == 0; } public boolean isMicrosoftUnicode() { return getPlatformID() == 3 && getEncodingID() == 1; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/FreetypeException.java0000644000175000017500000000365411001364660027773 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; /** */ public class FreetypeException extends Exception { public FreetypeException() { super(); } public FreetypeException(String message) { super(message); } public FreetypeException(String message, Throwable cause) { super(message, cause); } public FreetypeException(Throwable cause) { super(cause); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/Library.java0000644000175000017500000000543011337472130025733 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTFace; import de.intarsys.cwt.freetype.nativec.FTLibrary; import de.intarsys.cwt.freetype.nativec._FTNI; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeReference; public class Library { private _FTNI ftni; private FTLibrary library; protected Library(_FTNI paramFtni, FTLibrary paramLibrary) { ftni = paramFtni; library = paramLibrary; } public void doneFreeType() { ftni.DoneFreeType(library); } public FTLibrary getLibrary() { return library; } public Face newFace(String name, int index) { NativeReference refFace = NativeReference.create(FTFace.META); int rc = ftni.NewFace(library, name, index, refFace); if (rc != 0) { return null; } return new Face(ftni, (FTFace) refFace.getValue(), null); } public Face newMemoryFace(byte[] fontdata, int index) { NativeReference refFace = NativeReference.create(FTFace.META); NativeBuffer nativeBuffer = new NativeBuffer(fontdata); int rc = ftni.NewMemoryFace(library, nativeBuffer, index, refFace); if (rc != 0) { return null; } return new Face(ftni, (FTFace) refFace.getValue(), nativeBuffer); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/0000755000175000017500000000000011412336226025112 5ustar twernertwernerlibisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTGeneric.java0000644000175000017500000000540211222634152027562 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.NativeVoid; /** * */ public class FTGeneric extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTGeneric(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("data", NativeVoid.META.Ref()); META.declare("finalizer", NativeVoid.META.Ref()); } public FTGeneric() { } protected FTGeneric(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTGlyph.java0000644000175000017500000000566211222634152027301 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * The root glyph structure contains a given glyph image plus its advance width * in 16.16 fixed float format. */ public class FTGlyph extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTGlyph(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("library", FTLibrary.META.Ref()); META.declare("clazz", NativeLong.META); META.declare("format", FTEnum.META); META.declare("advance", FTVector.META); } public FTGlyph() { } protected FTGlyph(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTSizeMetrics.java0000644000175000017500000000621011222634150030443 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * The size metrics structure returned scaled important distances for a given * size object. */ public class FTSizeMetrics extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTSizeMetrics(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("xPPem", NativeShort.META.Ref()); META.declare("yPPem", NativeShort.META.Ref()); META.declare("xScale", FTFixed.META.Ref()); META.declare("yScale", FTFixed.META.Ref()); META.declare("ascender", FTPos.META.Ref()); META.declare("descender", FTPos.META.Ref()); META.declare("height", FTPos.META.Ref()); META.declare("maxAdvance", FTPos.META.Ref()); } public FTSizeMetrics() { } protected FTSizeMetrics(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTGlyphSlot.java0000644000175000017500000001353011222727142030136 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeInt; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.NativeVoid; import de.intarsys.nativec.type.StructMember; /** * FreeType root glyph slot class structure. A glyph slot is a container where * individual glyphs can be loaded, be they vectorial or bitmap/graymaps. */ public class FTGlyphSlot extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTGlyphSlot(handle); } } static final private StructMember advance; static final private StructMember bitmap; static final private StructMember bitmapLeft; static final private StructMember bitmapTop; static final private StructMember controlData; static final private StructMember controlLen; static final private StructMember face; static final private StructMember format; static final private StructMember generic; static final private StructMember internal; static final private StructMember library; static final private StructMember linearHoriAdvance; static final private StructMember linearVertAdvance; /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static final private StructMember metrics; static final private StructMember next; static final private StructMember numSubglyphs; static final private StructMember other; static final private StructMember outline; static final private StructMember reserved; static final private StructMember subglyphs; static { library = META.declare("library", FTLibrary.META.Ref()); //$NON-NLS-1$ face = META.declare("face", FTFace.META.Ref()); //$NON-NLS-1$ next = META.declare("next", FTGlyphSlot.META.Ref()); //$NON-NLS-1$ reserved = META.declare("reserved", NativeInt.META); //$NON-NLS-1$ generic = META.declare("generic", FTGeneric.META); //$NON-NLS-1$ metrics = META.declare("metrics", FTGlyphMetrics.META); //$NON-NLS-1$ linearHoriAdvance = META.declare("linearHoriAdvance", FTFixed.META); //$NON-NLS-1$ linearVertAdvance = META.declare("linearVertAdvance", FTFixed.META); //$NON-NLS-1$ advance = META.declare("advance", FTVector.META); //$NON-NLS-1$ format = META.declare("format", FTEnum.META); //$NON-NLS-1$ bitmap = META.declare("bitmap", FTBitmap.META); //$NON-NLS-1$ bitmapLeft = META.declare("bitmapLeft", NativeInt.META); //$NON-NLS-1$ bitmapTop = META.declare("bitmapTop", NativeInt.META); //$NON-NLS-1$ outline = META.declare("outline", FTOutline.META); //$NON-NLS-1$ numSubglyphs = META.declare("numSubglyphs", NativeInt.META); //$NON-NLS-1$ subglyphs = META.declare("subglyphs", NativeVoid.META.Ref()); //$NON-NLS-1$ controlData = META.declare("controlData", NativeVoid.META.Ref()); //$NON-NLS-1$ controlLen = META.declare("controlLen", NativeLong.META); //$NON-NLS-1$ other = META.declare("other", NativeLong.META); //$NON-NLS-1$ internal = META.declare("internal", NativeLong.META); //$NON-NLS-1$ } public FTGlyphSlot() { super(); } protected FTGlyphSlot(INativeHandle handle) { super(handle); } public FTBitmap getBitmap() { return (FTBitmap) bitmap.getNativeObject(this); } public int getBitmapLeft() { return bitmapLeft.getInt(this, 0); } public int getBitmapTop() { return bitmapTop.getInt(this, 0); } public FTGlyphMetrics getGlyphMetrics() { return (FTGlyphMetrics) metrics.getNativeObject(this); } public long getLinearHoriAdvance() { return linearHoriAdvance.getCLong(this, 0); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } public FTOutline getOutline() { return (FTOutline) outline.getNativeObject(this); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/_FTNI.java0000644000175000017500000001543311070671314026662 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import java.io.IOException; import de.intarsys.nativec.api.INativeFunction; import de.intarsys.nativec.api.INativeLibrary; import de.intarsys.nativec.api.NativeInterface; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeReference; import de.intarsys.tools.installresource.InstallZip; /** * The freetype native interface wrapper. */ public class _FTNI { private INativeLibrary LIB; private INativeFunction doneFace; private INativeFunction doneFreeType; private INativeFunction getCharIndex; private INativeFunction getFirstChar; private INativeFunction getPostscriptName; private INativeFunction getNameIndex; private INativeFunction initFreeType; private INativeFunction loadChar; private INativeFunction loadGlyph; private INativeFunction newFace; private INativeFunction newMemoryFace; private INativeFunction renderGlyph; private INativeFunction selectCharMap; private INativeFunction setCharMap; private INativeFunction setCharSize; private INativeFunction getSfntNameCount; private INativeFunction getSfntName; public _FTNI() { super(); init(); } public synchronized int DoneFace(FTFace face) { return doneFace.invoke(Integer.class, face).intValue(); } public synchronized int DoneFreeType(FTLibrary library) { return (doneFreeType.invoke(Integer.class, library)).intValue(); } public synchronized int GetCharIndex(FTFace face, int code) { return (getCharIndex.invoke(Integer.class, face, code)).intValue(); } public synchronized int GetFirstChar(FTFace face) { return (getFirstChar.invoke(Integer.class, face, new byte[4])) .intValue(); } public synchronized int GetNameIndex(FTFace face, String name) { return (getNameIndex.invoke(Integer.class, face, name)).intValue(); } public synchronized String GetPostscriptName(FTFace face) { return getPostscriptName.invoke(String.class, face); } public synchronized int GetSfntName(FTFace face, int index, FTSfntName sfntName) { return (getSfntName.invoke(Integer.class, face, index, sfntName)) .intValue(); } public synchronized int GetSfntNameCount(FTFace face) { return (getSfntNameCount.invoke(Integer.class, face)).intValue(); } private void init() { try { InstallZip installPackage = new InstallZip( "de/intarsys/cwt/freetype/nativec", "freetype.zip", true); installPackage.load(); if (installPackage.getFile() != null) { NativeInterface.get().addSearchPath( installPackage.getFile().getAbsolutePath()); } } catch (IOException e) { // } LIB = NativeInterface.get().createLibrary("freetype"); doneFace = LIB.getFunction("FT_Done_Face"); doneFreeType = LIB.getFunction("FT_Done_FreeType"); getCharIndex = LIB.getFunction("FT_Get_Char_Index"); getFirstChar = LIB.getFunction("FT_Get_First_Char"); getPostscriptName = LIB.getFunction("FT_Get_Postscript_Name"); getNameIndex = LIB.getFunction("FT_Get_Name_Index"); initFreeType = LIB.getFunction("FT_Init_FreeType"); loadChar = LIB.getFunction("FT_Load_Char"); loadGlyph = LIB.getFunction("FT_Load_Glyph"); newFace = LIB.getFunction("FT_New_Face"); newMemoryFace = LIB.getFunction("FT_New_Memory_Face"); renderGlyph = LIB.getFunction("FT_Render_Glyph"); selectCharMap = LIB.getFunction("FT_Select_Charmap"); setCharMap = LIB.getFunction("FT_Set_Charmap"); setCharSize = LIB.getFunction("FT_Set_Char_Size"); getSfntNameCount = LIB.getFunction("FT_Get_Sfnt_Name_Count"); getSfntName = LIB.getFunction("FT_Get_Sfnt_Name"); } public synchronized int InitFreeType(NativeReference refLibrary) { int rc = (initFreeType.invoke(Integer.class, refLibrary)).intValue(); return rc; } public synchronized int LoadChar(FTFace face, int code, int flags) { return (loadChar.invoke(Integer.class, face, code, flags)).intValue(); } public synchronized int LoadGlyph(FTFace face, int index, int flags) { return (loadGlyph.invoke(Integer.class, face, index, flags)).intValue(); } public synchronized int NewFace(FTLibrary library, String name, int index, NativeReference refFace) { int rc = (newFace.invoke(Integer.class, library, name, index, refFace)) .intValue(); return rc; } public synchronized int NewMemoryFace(FTLibrary library, NativeBuffer buffer, int fontIndex, NativeReference refFace) { int length = buffer.getSize(); int rc = (newMemoryFace.invoke(Integer.class, library, buffer, length, fontIndex, refFace)).intValue(); return rc; } public synchronized int RenderGlyph(FTGlyphSlot glyph, int flags) { return (renderGlyph.invoke(Integer.class, glyph, flags)).intValue(); } public synchronized int SelectCharMap(FTFace face, FTEnum encoding) { return (selectCharMap.invoke(Integer.class, face, encoding.intValue())) .intValue(); } public synchronized int SetCharMap(FTFace face, FTCharMap map) { int rc = (setCharMap.invoke(Integer.class, face, map)).intValue(); return rc; } public synchronized int SetCharSize(FTFace face, int width, int height, int hRes, int vRes) { return (setCharSize.invoke(Integer.class, face, width, height, hRes, vRes)).intValue(); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTFixed.java0000644000175000017500000000504611222634152027251 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeLongType; /** * */ public class FTFixed extends NativeLong { /** * The meta class implementation */ public static class MetaClass extends NativeLongType { protected MetaClass() { super(); } @Override public INativeObject createNative(INativeHandle handle) { return new FTFixed(handle); } @Override public INativeObject createNative(Object value) { throw new IllegalStateException("meta constructor missing"); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(); public FTFixed() { super(); } protected FTFixed(INativeHandle handle) { super(handle); } @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FreetypeNativeException.java0000644000175000017500000000371711001364656032600 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; public class FreetypeNativeException extends RuntimeException { public FreetypeNativeException() { super(); } public FreetypeNativeException(String message) { super(message); } public FreetypeNativeException(String message, Throwable cause) { super(message, cause); } public FreetypeNativeException(Throwable cause) { super(cause); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTOutlineGlyph.java0000644000175000017500000000550011222634150030626 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * A structure used for outline (vectorial) glyph images. This really is a * `sub-class' of `FT_GlyphRec'. */ public class FTOutlineGlyph extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTOutlineGlyph(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("root", FTGlyph.META); META.declare("outline", FTOutline.META); } public FTOutlineGlyph() { } protected FTOutlineGlyph(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTParameter.java0000644000175000017500000000551411222634150030130 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * A simple structure used to pass more or less generic parameters to * FT_Open_Face. */ public class FTParameter extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTParameter(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("tag", NativeLong.META); META.declare("data", NativeLong.META); } public FTParameter() { } protected FTParameter(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTOutline.java0000644000175000017500000001016611222727414027634 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeArray; import de.intarsys.nativec.type.NativeByte; import de.intarsys.nativec.type.NativeInt; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.StructMember; /** * */ public class FTOutline extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTOutline(handle); } } private static final StructMember contours; private static final StructMember flags; /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); private static final StructMember nContours; private static final StructMember nPoints; private static final StructMember points; private static final StructMember tags; static { nContours = META.declare("nContours", NativeShort.META); //$NON-NLS-1$ nPoints = META.declare("nPoints", NativeShort.META); //$NON-NLS-1$ points = META.declare("points", FTVector.META.Array(0).Ref()); //$NON-NLS-1$ tags = META.declare("tags", NativeByte.META.Array(0).Ref()); //$NON-NLS-1$ contours = META.declare("contours", NativeShort.META.Array(0).Ref()); //$NON-NLS-1$ flags = META.declare("flags", NativeInt.META); //$NON-NLS-1$ } public FTOutline() { super(); } protected FTOutline(INativeHandle handle) { super(handle); } public NativeArray getContours() { NativeArray array = (NativeArray) contours.getValue(this); array.setSize(getNumContours()); return array; } public int getFlags() { return flags.getInt(this, 0); } @Override public INativeType getNativeType() { return META; } public int getNumContours() { return nContours.getShort(this, 0); } public int getNumPoints() { return nPoints.getShort(this, 0); } public NativeArray getPoints() { NativeArray array = (NativeArray) points.getValue(this); array.setSize(getNumPoints()); return array; } public NativeArray getTags() { NativeArray array = (NativeArray) tags.getValue(this); array.setSize(getNumPoints()); return array; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTSize.java0000644000175000017500000000547411222634152027131 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * The size metrics structure returned scaled important distances for a given * size object. */ public class FTSize extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTSize(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("face", FTFace.META.Ref()); META.declare("generics", FTGeneric.META); META.declare("metrics", FTSizeMetrics.META); META.declare("internal", NativeLong.META); } public FTSize() { } protected FTSize(INativeHandle handle) { super(handle); } @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTPos.java0000644000175000017500000000503611222634152026752 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeLongType; /** * */ public class FTPos extends NativeLong { /** * The meta class implementation */ public static class MetaClass extends NativeLongType { protected MetaClass() { super(); } @Override public INativeObject createNative(INativeHandle handle) { return new FTPos(handle); } @Override public INativeObject createNative(Object value) { throw new IllegalStateException("meta constructor missing"); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(); public FTPos() { super(); } protected FTPos(INativeHandle handle) { super(handle); } @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTEnum.java0000644000175000017500000001026111222634152027111 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeSimple; import de.intarsys.nativec.type.NativeSimpleType; /** * */ public class FTEnum extends NativeSimple { /** * The meta class implementation */ public static class MetaClass extends NativeSimpleType { protected MetaClass() { super(); } @Override public INativeObject createNative(INativeHandle handle) { return new FTEnum(handle); } @Override public INativeObject createNative(Object value) { throw new IllegalStateException("meta constructor missing"); } @Override public int getByteCount() { return SIZE_INT; } } /** The meta class instance */ public static final MetaClass META = new MetaClass(); public static final FTEnum ENCODING_ADOBE_CUSTOM = new FTEnum('A', 'D', 'B', 'C'); public static final FTEnum ENCODING_ADOBE_EXPERT = new FTEnum('A', 'D', 'B', 'E'); public static final FTEnum ENCODING_ADOBE_LATIN1 = new FTEnum('l', 'a', 't', '1'); public static final FTEnum ENCODING_ADOBE_STANDARD = new FTEnum('A', 'D', 'O', 'B'); public static final FTEnum ENCODING_MS_SYMBOL = new FTEnum('s', 'y', 'm', 'b'); public static final FTEnum ENCODING_UNICODE = new FTEnum('u', 'n', 'i', 'c'); public FTEnum(char a, char b, char c, char d) { allocate(); handle.setByte(3, (byte) a); handle.setByte(2, (byte) b); handle.setByte(1, (byte) c); handle.setByte(0, (byte) d); } protected FTEnum(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (obj instanceof FTEnum) { return intValue() == ((FTEnum) obj).intValue(); } else { return false; } } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } public Object getValue() { return new Integer(intValue()); } /* * (non-Javadoc) * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return intValue(); } public int intValue() { return handle.getInt(0); } public void setValue(Object value) { handle.setInt(0, ((Number) value).intValue()); } @Override public String toString() { return "<" + (char) handle.getByte(0) + (char) handle.getByte(1) + (char) handle.getByte(2) + (char) handle.getByte(3) + ">"; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTOpenArgs.java0000644000175000017500000000650111222634152027725 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeString; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * A structure used to indicate how to open a new font file/stream. A pointer to * such a structure can be used as a parameter for the functions FT_Open_Face * and FT_Attach_Stream. */ public class FTOpenArgs extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTOpenArgs(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("flags", NativeLong.META); META.declare("memoryBase", NativeBuffer.META.Ref()); META.declare("memorySize", NativeLong.META); META.declare("pathname", NativeString.META.Ref()); META.declare("stream", NativeLong.META); META.declare("driver", NativeLong.META); META.declare("numParams", NativeLong.META); META.declare("params", FTParameter.META.Array(0).Ref()); } public FTOpenArgs() { } protected FTOpenArgs(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTFace.java0000644000175000017500000002326411222724644027060 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeArray; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeByte; import de.intarsys.nativec.type.NativeInt; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeString; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.NativeVoid; import de.intarsys.nativec.type.StructMember; /** * FreeType root face class structure. A face object models the resolution and * point-size independent data found in a font file. * *
 *  typedef struct  FT_FaceRec_
 *  {
 *  FT_Long           num_faces;
 *  FT_Long           face_index;
 * 
 *  FT_Long           face_flags;
 *  FT_Long           style_flags;
 * 
 *  FT_Long           num_glyphs;
 * 
 *  FT_String*        family_name;
 *  FT_String*        style_name;
 * 
 *  FT_Int            num_fixed_sizes;
 *  FT_Bitmap_Size*   available_sizes;
 * 
 *  FT_Int            num_charmaps;
 *  FT_CharMap*       charmaps;
 * 
 *  FT_Generic        generic;
 * 
 *  FT_BBox           bbox;
 * 
 *  FT_UShort         units_per_EM;
 *  FT_Short          ascender;
 *  FT_Short          descender;
 *  FT_Short          height;
 * 
 *  FT_Short          max_advance_width;
 *  FT_Short          max_advance_height;
 * 
 *  FT_Short          underline_position;
 *  FT_Short          underline_thickness;
 * 
 *  FT_GlyphSlot      glyph;
 *  FT_Size           size;
 *  FT_CharMap        charmap;
 * 
 *  FT_Driver         driver;
 *  FT_Memory         memory;
 *  FT_Stream         stream;
 * 
 *  FT_ListRec        sizes_list;
 * 
 *  FT_Generic        autohint;
 *  void*             extensions;
 * 
 *  FT_Face_Internal  internal;
 *  } FT_FaceRec;
 * 
*/ public class FTFace extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTFace(handle); } } static final private StructMember ascender; static final private StructMember availableSizes; static final private StructMember bbox; static final private StructMember charMap; static final private StructMember charMaps; static final private StructMember descender; static final private StructMember faceFlags; static final private StructMember faceIndex; static final private StructMember familyName; static final private StructMember generic; static final private StructMember glyphSlot; static final private StructMember height; static final private StructMember maxAdvanceHeight; static final private StructMember maxAdvanveWidth; /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static final private StructMember numCharMaps; static final private StructMember numFaces; static final private StructMember numFixedSizes; static final private StructMember numGlyphs; static final private StructMember size; static final private StructMember styleFlags; static final private StructMember styleName; static final private StructMember underlinePosition; static final private StructMember underlineThickness; static final private StructMember unitsPerEM; static { numFaces = META.declare("numFaces", NativeLong.META); //$NON-NLS-1$ faceIndex = META.declare("faceIndex", NativeLong.META); //$NON-NLS-1$ faceFlags = META.declare("faceFlags", NativeLong.META); //$NON-NLS-1$ styleFlags = META.declare("styleFlags", NativeLong.META); //$NON-NLS-1$ numGlyphs = META.declare("numGlyphs", NativeLong.META); //$NON-NLS-1$ familyName = META.declare("familyName", NativeString.META.Ref()); //$NON-NLS-1$ styleName = META.declare("styleName", NativeString.META.Ref()); //$NON-NLS-1$ numFixedSizes = META.declare("numFixedSizes", NativeInt.META); //$NON-NLS-1$ availableSizes = META.declare("availableSizes", FTBitmapSize.META.Ref() .Array(0).Ref()); //$NON-NLS-1$ numCharMaps = META.declare("numCharMaps", NativeInt.META); //$NON-NLS-1$ charMaps = META .declare("charMaps", FTCharMap.META.Ref().Array(0).Ref()); //$NON-NLS-1$ generic = META.declare("generic", FTGeneric.META); //$NON-NLS-1$ bbox = META.declare("bbox", FTBBox.META); //$NON-NLS-1$ unitsPerEM = META.declare("unitsPerEM", NativeShort.META); //$NON-NLS-1$ ascender = META.declare("ascender", NativeShort.META); //$NON-NLS-1$ descender = META.declare("descender", NativeShort.META); //$NON-NLS-1$ height = META.declare("height", NativeShort.META); //$NON-NLS-1$ maxAdvanveWidth = META.declare("maxAdvanceWidth", NativeShort.META); //$NON-NLS-1$ maxAdvanceHeight = META.declare("maxAdvanceHeight", NativeShort.META); //$NON-NLS-1$ underlinePosition = META.declare("underlinePosition", NativeShort.META); //$NON-NLS-1$ underlineThickness = META.declare("underlineThickness", //$NON-NLS-1$ NativeShort.META); glyphSlot = META.declare("glyph", FTGlyphSlot.META.Ref()); size = META.declare("size", FTSize.META.Ref()); charMap = META.declare("charMap", FTCharMap.META.Ref()); // rest is private // no explicit type for FT_DriverRec - use void META.declare("driver", NativeVoid.META.Ref()); // no explicit type for FT_MemoryRec - use void META.declare("memory", NativeVoid.META.Ref()); // no explicit type for FT_MemoryRec - use void META.declare("stream", NativeVoid.META.Ref()); // no explicit type for FT_ListRec - approximate META.declare("sizesList", NativeByte.META.Array(16)); META.declare("autohint", FTGeneric.META); META.declare("extensions", NativeVoid.META.Ref()); // no explicit type for FT_Face_InternalRec - use void META.declare("internal", NativeVoid.META.Ref()); } private NativeBuffer faceBuffer; public FTFace() { } protected FTFace(INativeHandle handle) { super(handle); } public short getAscender() { return ascender.getShort(this, 0); } public FTBBox getBBox() { return (FTBBox) bbox.getNativeObject(this); } public FTCharMap getCharMap() { return (FTCharMap) charMap.getValue(this); } public NativeArray getCharMaps() { NativeArray array = (NativeArray) charMaps.getValue(this); array.setSize(getNumCharMaps()); return array; } public short getDescender() { return descender.getShort(this, 0); } public NativeBuffer getFaceBuffer() { return faceBuffer; } public long getFaceFlags() { return faceFlags.getCLong(this, 0); } public long getFaceIndex() { return faceIndex.getCLong(this, 0); } public String getFamilyName() { return ((NativeString) familyName.getValue(this)).stringValue(); } public FTGlyphSlot getGlyphSlot() { return (FTGlyphSlot) glyphSlot.getValue(this); } public short getHeight() { return height.getShort(this, 0); } @Override public INativeType getNativeType() { return META; } public int getNumCharMaps() { return numCharMaps.getInt(this, 0); } public long getNumFaces() { return numFaces.getCLong(this, 0); } public long getNumGlyphs() { return numGlyphs.getCLong(this, 0); } public long getStyleFlags() { return styleFlags.getCLong(this, 0); } public String getStyleName() { return ((NativeString) styleName.getValue(this)).stringValue(); } public short getUnderlinePosition() { return underlinePosition.getShort(this, 0); } public short getUnderlineThickness() { return underlineThickness.getShort(this, 0); } public short getUnitsPerEM() { return unitsPerEM.getShort(this, 0); } public void setCharMap(_FTNI ftni, FTCharMap charMap) { ftni.SetCharMap(this, charMap); } public void setFaceBuffer(NativeBuffer faceBuffer) { this.faceBuffer = faceBuffer; } }libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTVector.java0000644000175000017500000000637711222634152027464 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeObject; import de.intarsys.nativec.type.NativeSimple; import de.intarsys.nativec.type.NativeSimpleType; /** *

* This is moved to primitive for performance reasons. * */ public class FTVector extends NativeSimple { /** * The meta class implementation */ public static class MetaClass extends NativeSimpleType { protected MetaClass() { super(); } @Override public INativeObject createNative(INativeHandle handle) { return new FTVector(handle); } @Override public INativeObject createNative(Object value) { throw new IllegalStateException("meta constructor missing"); } @Override public int getByteCount() { // actually a struct of two longs return SIZE_TWO_LONGS; } } private static final int SIZE_TWO_LONGS = SIZE_LONG * 2; /** The meta class instance */ public static final MetaClass META = new MetaClass(); public static final int SHIFT_VECTOR = NativeObject.SHIFT_LONG + 1; public FTVector() { allocate(); } protected FTVector(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } public Object getValue() { // not applicable return this; } public int getX() { return handle.getInt(0); } public int getY() { return handle.getInt(SIZE_LONG); } public void setValue(Object value) { // } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTLibrary.java0000644000175000017500000000604411222634152027615 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * A handle to a FreeType library instance. Each `library' is completely * independent from the others; it is the `root' of a set of objects like fonts, * faces, sizes, etc. It also embeds a memory manager (see FT_Memory), as well * as a scan-line converter object (see FT_Raster). note Library objects are * normally created by FT_Init_FreeType, and destroyed with FT_Done_FreeType. */ public class FTLibrary extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTLibrary(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { // nothing to declare here } /** * */ public FTLibrary() { } protected FTLibrary(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTBBox.java0000644000175000017500000000667511222725340027055 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.StructMember; /** *

 *  typedef struct FT_BBox_
 *  {
 *  FT_Pos xMin, yMin;
 *  FT_Pos xMax, yMax;
 *  } FT_BBox
 * 
*/ public class FTBBox extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTBBox(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); private static final StructMember XMax; private static final StructMember XMin; private static final StructMember YMax; private static final StructMember YMin; static { XMin = META.declare("xMin", FTPos.META); //$NON-NLS-1$ YMin = META.declare("yMin", FTPos.META); //$NON-NLS-1$ XMax = META.declare("xMax", FTPos.META); //$NON-NLS-1$ YMax = META.declare("yMax", FTPos.META); //$NON-NLS-1$ } /** * */ public FTBBox() { super(); } protected FTBBox(INativeHandle handle) { super(handle); } public long getMaxX() { return XMax.getCLong(this, 0); } public long getMaxY() { return YMax.getCLong(this, 0); } public long getMinX() { return XMin.getCLong(this, 0); } public long getMinY() { return YMin.getCLong(this, 0); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTData.java0000644000175000017500000000550111222634152027057 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * typedef struct FT_BBox_ { FT_Pos xMin, yMin; FT_Pos xMax, yMax; } FT_BBox */ public class FTData extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTData(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("xMin", FTPos.META); META.declare("yMin", FTPos.META); META.declare("xMax", FTPos.META); META.declare("yMax", FTPos.META); } public FTData() { } protected FTData(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTMatrix.java0000644000175000017500000000554511222634152027462 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * Read-only binary data represented as a pointer and a length. */ public class FTMatrix extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTMatrix(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("pointer", NativeBuffer.META.Ref()); META.declare("length", NativeLong.META); } public FTMatrix() { } protected FTMatrix(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTBitmap.java0000644000175000017500000000736011222634152027427 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeByte; import de.intarsys.nativec.type.NativeInt; import de.intarsys.nativec.type.NativeNumber; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.NativeVoid; /** * */ public class FTBitmap extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTBitmap(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("rows", NativeInt.META); META.declare("width", NativeInt.META); META.declare("pitch", NativeInt.META); META.declare("buffer", NativeBuffer.META.Ref()); META.declare("numGrays", NativeShort.META); META.declare("pixelMode", NativeByte.META); META.declare("paletteMode", NativeByte.META); META.declare("palette", NativeVoid.META.Ref()); } /** * */ public FTBitmap() { } protected FTBitmap(INativeHandle handle) { super(handle); } public NativeBuffer getBuffer() { int size = getRows() * getPitch(); NativeBuffer buffer = (NativeBuffer) getNativeObject("buffer") .getValue(); buffer.setSize(size); return buffer; } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } public int getPitch() { return ((NativeNumber) getNativeObject("pitch")).intValue(); } public int getRows() { return ((NativeNumber) getNativeObject("rows")).intValue(); } public int getWidth() { return ((NativeNumber) getNativeObject("width")).intValue(); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTGlyphMetrics.java0000644000175000017500000000737611222726462030642 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; import de.intarsys.nativec.type.StructMember; /** * A structure used to model the metrics of a single glyph. The values are * expressed in 26.6 fractional pixel format; if the flag FT_LOAD_NO_SCALE is * used, values are returned in font units instead. */ public class FTGlyphMetrics extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTGlyphMetrics(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); private static final StructMember Height; private static final StructMember HoriAdvance; private static final StructMember VeriAdvance; private static final StructMember Width; static { Width= META.declare("width", FTPos.META); //$NON-NLS-1$ Height = META.declare("height", FTPos.META); //$NON-NLS-1$ META.declare("horiBearingX", FTPos.META); //$NON-NLS-1$ META.declare("horiBearingY", FTPos.META); //$NON-NLS-1$ HoriAdvance = META.declare("horiAdvance", FTPos.META); //$NON-NLS-1$ META.declare("veriBearingX", FTPos.META); //$NON-NLS-1$ META.declare("veriBearingY", FTPos.META); //$NON-NLS-1$ VeriAdvance = META.declare("veriAdvance", FTPos.META); //$NON-NLS-1$ } public FTGlyphMetrics() { super(); } protected FTGlyphMetrics(INativeHandle handle) { super(handle); } public long getHeight() { return Height.getCLong(this, 0); } public long getHoriAdvance() { return HoriAdvance.getCLong(this, 0); } @Override public INativeType getNativeType() { return META; } public long getVeriAdvance() { return VeriAdvance.getCLong(this, 0); } public long getWidth() { return Width.getCLong(this, 0); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTBitmapSize.java0000644000175000017500000000646011222634152030262 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * This structure models the size of a bitmap strike (i.e., a bitmap instance of * the font for a given resolution) in a fixed-size font face. It is used for * the `available_sizes' field of the FT_FaceRec structure. * *
 *  typedef struct  FT_Bitmap_Size_
 *  {
 *  FT_Short  height;
 *  FT_Short  width;
 * 
 *  FT_Pos    size;
 * 
 *  FT_Pos    x_ppem;
 *  FT_Pos    y_ppem;
 *  } FT_Bitmap_Size;
 * 
*/ public class FTBitmapSize extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTBitmapSize(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("height", NativeShort.META); META.declare("width", NativeShort.META); META.declare("size", FTPos.META); META.declare("xPPem", FTPos.META.Ref()); META.declare("yPPem", FTPos.META.Ref()); } public FTBitmapSize() { } protected FTBitmapSize(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTCharMap.java0000644000175000017500000001054511222634150027523 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeNumber; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * The base charmap structure. * *
 *  typedef struct  FT_CharMapRec_
 *  {
 *  FT_Face      face;
 *  FT_Encoding  encoding;
 *  FT_UShort    platform_id;
 *  FT_UShort    encoding_id;
 *  } FT_CharMapRec;
 * 
*/ public class FTCharMap extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTCharMap(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("face", FTFace.META.Ref()); META.declare("encoding", FTEnum.META); META.declare("platformId", NativeShort.META); META.declare("encodingId", NativeShort.META); } private FTEnum cachedEncoding = null; private int encodingId = -1; private int platformId = -1; public FTCharMap() { } protected FTCharMap(INativeHandle handle) { super(handle); } public FTEnum getEncoding() { if (cachedEncoding == null) { cachedEncoding = (FTEnum) getNativeObject("encoding"); } return cachedEncoding; } public int getEncodingId() { if (encodingId == -1) { encodingId = ((NativeNumber) getNativeObject("encodingId")) .intValue(); } return encodingId; } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } public int getPlatformId() { if (platformId == -1) { platformId = ((NativeNumber) getNativeObject("platformId")) .intValue(); } return platformId; } public boolean isEncodingAdobeCustom() { return getEncoding().equals(FTEnum.ENCODING_ADOBE_CUSTOM); } public boolean isEncodingAdobeExpert() { return getEncoding().equals(FTEnum.ENCODING_ADOBE_EXPERT); } public boolean isEncodingAdobeLatin1() { return getEncoding().equals(FTEnum.ENCODING_ADOBE_LATIN1); } public boolean isEncodingAdobeStandard() { return getEncoding().equals(FTEnum.ENCODING_ADOBE_STANDARD); } public boolean isEncodingMSSymbol() { return getEncoding().equals(FTEnum.ENCODING_MS_SYMBOL); } public boolean isEncodingUnicode() { return getEncoding().equals(FTEnum.ENCODING_UNICODE); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTBitmapGlyph.java0000644000175000017500000000552111222634152030430 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** * */ public class FTBitmapGlyph extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTBitmapGlyph(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("root", FTGlyph.META); META.declare("left", NativeLong.META); META.declare("top", NativeLong.META); META.declare("bitmap", FTBitmap.META); } public FTBitmapGlyph() { } protected FTBitmapGlyph(INativeHandle handle) { super(handle); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/nativec/FTSfntName.java0000644000175000017500000001060411222634152027721 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype.nativec; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.INativeObject; import de.intarsys.nativec.type.INativeType; import de.intarsys.nativec.type.NativeBuffer; import de.intarsys.nativec.type.NativeLong; import de.intarsys.nativec.type.NativeNumber; import de.intarsys.nativec.type.NativeShort; import de.intarsys.nativec.type.NativeStaticStruct; import de.intarsys.nativec.type.NativeStructType; /** *
 *  typedef struct  FT_SfntName_
 *  {
 *  FT_UShort  platform_id;
 *  FT_UShort  encoding_id;
 *  FT_UShort  language_id;
 *  FT_UShort  name_id;
 * 
 *  FT_Byte*   string;      // this string is *not* null-terminated! 
 *  FT_UInt    string_len;  // in bytes 
 * 
 *  } FT_SfntName;
 * 
*/ public class FTSfntName extends NativeStaticStruct { /** * The meta class implementation */ public static class MetaClass extends NativeStructType { protected MetaClass(Class instanceClass) { super(instanceClass); } @Override public INativeObject createNative(INativeHandle handle) { return new FTSfntName(handle); } } /** The meta class instance */ public static final MetaClass META = new MetaClass(MetaClass.class .getDeclaringClass()); static { META.declare("platformId", NativeShort.META); META.declare("encodingId", NativeShort.META); META.declare("languageId", NativeShort.META); META.declare("nameId", NativeShort.META); META.declare("buffer", NativeBuffer.META.Ref()); META.declare("length", NativeLong.META); } /** * */ public FTSfntName() { } protected FTSfntName(INativeHandle handle) { super(handle); } public NativeBuffer getBuffer() { NativeBuffer buffer = (NativeBuffer) getNativeObject("buffer") .getValue(); buffer.setSize(getLength()); return buffer; } public int getEncodingId() { return ((NativeNumber) getNativeObject("encodingId")).intValue(); } public int getLanguageId() { return ((NativeNumber) getNativeObject("languageId")).intValue(); } public int getLength() { return ((NativeNumber) getNativeObject("length")).intValue(); } /* * (non-Javadoc) * * @see de.intarsys.graphic.freetype.NativeObject#getMetaClass() */ @Override public INativeType getNativeType() { return META; } public String getName() { byte[] nameBytes = getBuffer().getBytes(); return new String(nameBytes); } public String getName(String encoding) { byte[] nameBytes = getBuffer().getBytes(); try { return new String(nameBytes, encoding); } catch (Exception e) { return getName(); } } public int getNameId() { return ((NativeNumber) getNativeObject("nameId")).intValue(); } public int getPlatformId() { return ((NativeNumber) getNativeObject("platformId")).intValue(); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/SfntName.java0000644000175000017500000000441511054474716026054 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTSfntName; import de.intarsys.cwt.freetype.nativec._FTNI; public class SfntName { private FTSfntName sfntName; protected SfntName(_FTNI ftni, FTSfntName sfntName) { this.sfntName = sfntName; } public int getEncodingId() { return sfntName.getEncodingId(); } public int getLanguageId() { return sfntName.getLanguageId(); } public String getName() { if (sfntName.getPlatformId() == 3) { return sfntName.getName("UTF-16BE"); } else { return sfntName.getName(); } } public int getNameId() { return sfntName.getNameId(); } public int getPlatformId() { return sfntName.getPlatformId(); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/GlyphSlot.java0000644000175000017500000000465711222727142026265 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTGlyphSlot; import de.intarsys.cwt.freetype.nativec._FTNI; public class GlyphSlot { private _FTNI ftni; private FTGlyphSlot glyphSlot; protected GlyphSlot(_FTNI paramFtni, FTGlyphSlot paramGlyphSlot) { ftni = paramFtni; glyphSlot = paramGlyphSlot; } public GlyphMetrics getGlyphMetrics() { return new GlyphMetrics(ftni, glyphSlot.getGlyphMetrics()); } public FTGlyphSlot getGlyphSlot() { return glyphSlot; } public long getLinearHoriAdvance() { return glyphSlot.getLinearHoriAdvance(); } public Outline getOutline() { return new Outline(ftni, glyphSlot.getOutline()); } public void renderGlyph(int flags) throws FreetypeException { int rc; rc = ftni.RenderGlyph(glyphSlot, flags); if (rc != 0) { throw new FreetypeException(); } } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/GlyphMetrics.java0000644000175000017500000000431711222726462026747 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTGlyphMetrics; import de.intarsys.cwt.freetype.nativec._FTNI; public class GlyphMetrics { private _FTNI ftni; private FTGlyphMetrics glyphMetrics; protected GlyphMetrics(_FTNI paramFtni, FTGlyphMetrics pGlyphMetrics) { ftni = paramFtni; glyphMetrics = pGlyphMetrics; } public long getHeight() { return glyphMetrics.getHeight(); } public long getHoriAdvance() { return glyphMetrics.getHoriAdvance(); } public long getVeriAdvance() { return glyphMetrics.getVeriAdvance(); } public long getWidth() { return glyphMetrics.getWidth(); } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/Freetype.java0000644000175000017500000000722211222634150026106 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTLibrary; import de.intarsys.cwt.freetype.nativec._FTNI; import de.intarsys.nativec.type.NativeReference; public class Freetype { public static final byte CURVE_TAG_CONIC = 0; public static final byte CURVE_TAG_CUBIC = 2; public static final byte CURVE_TAG_ON = 1; public static final int LOAD_CROP_BITMAP = 0x40; public static final int LOAD_DEFAULT = 0x0; public static final int LOAD_FORCE_AUTOHINT = 0x20; public static final int LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH = 0x200; public static final int LOAD_IGNORE_TRANSFORM = 0x800; public static final int LOAD_LINEAR_DESIGN = 0x2000; public static final int LOAD_MONOCHROME = 0x1000; public static final int LOAD_NO_BITMAP = 0x8; public static final int LOAD_NO_HINTING = 0x2; public static final int LOAD_NO_RECURSE = 0x400; public static final int LOAD_NO_SCALE = 0x1; public static final int LOAD_PEDANTIC = 0x80; public static final int LOAD_RENDER = 0x4; public static final int LOAD_VERTICAL_LAYOUT = 0x10; public static final int OUTLINE_EVEN_ODD_FILL = 0x2; public static final int OUTLINE_HIGH_PRECISION = 0x100; public static final int OUTLINE_IGNORE_DROPOUTS = 0x8; public static final int OUTLINE_NONE = 0x0; public static final int OUTLINE_OWNER = 0x1; public static final int OUTLINE_REVERSE_FILL = 0x4; public static final int OUTLINE_SINGLE_PASS = 0x200; public static final int RENDER_MODE_LCD = 3; public static final int RENDER_MODE_LCD_V = 4; public static final int RENDER_MODE_LIGHT = 1; public static final int RENDER_MODE_MONO = 2; public static final int RENDER_MODE_NORMAL = 0; static private _FTNI ftni; static { ftni = new _FTNI(); } static public Library initFreeType() { NativeReference refLibrary = NativeReference.create(FTLibrary.META); int rc = ftni.InitFreeType(refLibrary); FTLibrary library = (FTLibrary) refLibrary.getValue(); return new Library(ftni, library); } private Freetype() { // instance creation prohibited } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/PACKAGE.java0000644000175000017500000000373111337472130025364 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import java.util.logging.Logger; import de.intarsys.tools.logging.LogTools; import de.intarsys.tools.message.MessageBundle; import de.intarsys.tools.message.MessageBundleTools; public class PACKAGE { public final static MessageBundle Messages = MessageBundleTools .getMessageBundle(PACKAGE.class); public final static Logger Log = LogTools.getLogger(PACKAGE.class); } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/Outline.java0000644000175000017500000000612611131667170025753 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import de.intarsys.cwt.freetype.nativec.FTOutline; import de.intarsys.cwt.freetype.nativec.FTVector; import de.intarsys.cwt.freetype.nativec._FTNI; import de.intarsys.nativec.api.INativeHandle; import de.intarsys.nativec.type.NativeNumber; public class Outline { private _FTNI ftni; private FTOutline outline; private INativeHandle pointsHandle; private INativeHandle tagsHandle; protected Outline(_FTNI paramFtni, FTOutline paramOutline) { ftni = paramFtni; outline = paramOutline; pointsHandle = outline.getPoints().getNativeHandle(); tagsHandle = outline.getTags().getNativeHandle(); } public int getContour(int index) { return outline.getContours().getShort(index << 1); } public int getFlags() { return outline.getFlags(); } public int getNumContours() { return outline.getNumContours(); } public FTOutline getOutline() { return outline; } public int getPointX(int index) { return pointsHandle.getInt((index << FTVector.SHIFT_VECTOR)); } public int getPointY(int index) { return pointsHandle.getInt((index << FTVector.SHIFT_VECTOR) + NativeNumber.SIZE_LONG); } public byte getTag(int index) { return tagsHandle.getByte(index); } public boolean isEvenOddFill() { return (getFlags() & Freetype.OUTLINE_EVEN_ODD_FILL) != 0; } public boolean isOwner() { return (getFlags() & Freetype.OUTLINE_OWNER) != 0; } public boolean isReverseFill() { return (getFlags() & Freetype.OUTLINE_REVERSE_FILL) != 0; } } libisfreetype-java-5.3.20100629/src/de/intarsys/cwt/freetype/Face.java0000644000175000017500000001266111412327656025177 0ustar twernertwerner/* * Copyright (c) 2008, intarsys consulting GmbH * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of intarsys nor the names of its contributors may be used * to endorse or promote products derived from this software without specific * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package de.intarsys.cwt.freetype; import java.awt.geom.Rectangle2D; import java.util.logging.Level; import java.util.logging.Logger; import de.intarsys.cwt.freetype.nativec.FTBBox; import de.intarsys.cwt.freetype.nativec.FTCharMap; import de.intarsys.cwt.freetype.nativec.FTEnum; import de.intarsys.cwt.freetype.nativec.FTFace; import de.intarsys.cwt.freetype.nativec.FTSfntName; import de.intarsys.cwt.freetype.nativec._FTNI; import de.intarsys.nativec.type.NativeBuffer; public class Face { private static final Logger Log = PACKAGE.Log; final private FTFace face; final private NativeBuffer fontData; final private _FTNI ftni; private CharMap cachedCharMap = null; /** * */ protected Face(_FTNI pFtni, FTFace pFace, NativeBuffer pFontData) { this.ftni = pFtni; this.face = pFace; this.fontData = pFontData; } public void clearCache() { cachedCharMap = null; } public void doneFace() { int rc = ftni.DoneFace(face); if (rc != 0) { Log.log(Level.WARNING, "error " + rc + " in DoneFace"); } } public int getAscender() { return face.getAscender(); } public Rectangle2D getBBox() { FTBBox faceBox = face.getBBox(); Rectangle2D.Float result = new Rectangle2D.Float(); result.x = faceBox.getMinX(); result.y = faceBox.getMinY(); result.width = faceBox.getMaxX() - faceBox.getMinX(); result.height = faceBox.getMaxY() - faceBox.getMinY(); return result; } public int getCharIndex(int code) { return ftni.GetCharIndex(face, code); } public CharMap getCharMap() { if (cachedCharMap == null) { cachedCharMap = CharMap.create(ftni, face.getCharMap()); } return cachedCharMap; } public CharMap getCharMap(int index) { return new CharMap(ftni, (FTCharMap) face.getCharMaps().getValue(index)); } public int getDescender() { return face.getDescender(); } public FTFace getFace() { return face; } public String getFamilyName() { return face.getFamilyName(); } public int getFirstChar() { return ftni.GetFirstChar(face); } public NativeBuffer getFontData() { return fontData; } public GlyphSlot getGlyphSlot() { return new GlyphSlot(ftni, face.getGlyphSlot()); } public int getHeight() { return face.getHeight(); } public int getNameIndex(String name) { return ftni.GetNameIndex(face, name); } public int getNumCharMaps() { return face.getNumCharMaps(); } public String getPostscriptName() { return ftni.GetPostscriptName(face); } public SfntName getSfntName(int index) { FTSfntName ftSfntName = new FTSfntName(); int rc = ftni.GetSfntName(face, index, ftSfntName); if (rc != 0) { return null; } return new SfntName(ftni, ftSfntName); } public int getSfntNameCount() { return ftni.GetSfntNameCount(face); } public String getStyleName() { return face.getStyleName(); } public int getUnderlinePosition() { return face.getUnderlinePosition(); } public int getUnderlineThickness() { return face.getUnderlineThickness(); } public int getUnitsPerEM() { return face.getUnitsPerEM(); } public void loadChar(int code, int flags) throws FreetypeException { int rc = ftni.LoadChar(face, code, flags); if (rc != 0) { throw new FreetypeException(); } } public void loadGlyph(int index, int flags) throws FreetypeException { int rc = ftni.LoadGlyph(face, index, flags); if (rc != 0) { throw new FreetypeException(); } } public void selectCharMap(FTEnum id) throws FreetypeException { int rc = ftni.SelectCharMap(face, id); if (rc != 0) { throw new FreetypeException(); } } public void setCharMap(CharMap charMap) { ftni.SetCharMap(face, charMap.getCharMap()); clearCache(); } public void setCharSize(int width, int height, int hRes, int vRes) { ftni.SetCharSize(face, width, height, hRes, vRes); } } libisfreetype-java-5.3.20100629/doc/0000755000175000017500000000000011412336226016553 5ustar twernertwernerlibisfreetype-java-5.3.20100629/doc/3rd_party_licenses/0000755000175000017500000000000011412336226022347 5ustar twernertwernerlibisfreetype-java-5.3.20100629/doc/3rd_party_licenses/lgpl-2.1.txt0000644000175000017500000006447211220404462024354 0ustar twernertwerner GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libisfreetype-java-5.3.20100629/doc/3rd_party_licenses/freetype_license.txt0000644000175000017500000000241011031114350026417 0ustar twernertwerner The FreeType 2 font engine is copyrighted work and cannot be used legally without a software license. In order to make this project usable to a vast majority of developers, we distribute it under two mutually exclusive open-source licenses. This means that *you* must choose *one* of the two licenses described below, then obey all its terms and conditions when using FreeType 2 in any of your projects or products. - The FreeType License, found in the file `FTL.TXT', which is similar to the original BSD license *with* an advertising clause that forces you to explicitly cite the FreeType project in your product's documentation. All details are in the license file. This license is suited to products which don't use the GNU General Public License. - The GNU General Public License version 2, found in `GPL.TXT' (any later version can be used also), for programs which already use the GPL. Note that the FTL is incompatible with the GPL due to its advertisement clause. The contributed PCF driver comes with a license similar to that of the X Window System. It is compatible to the above two licenses (see file src/pcf/readme). --- end of licence.txt --- libisfreetype-java-5.3.20100629/doc/3rd_party_licenses/jna_license.txt0000644000175000017500000000026511030721450025356 0ustar twernertwernerThis program uses jna (https://jna.dev.java.net/). jna is governed by the LGPL license, available in this directory. jna source code is available at https://jna.dev.java.net/.libisfreetype-java-5.3.20100629/doc/3rd_party_licenses/FTL.txt0000644000175000017500000001576611031114350023541 0ustar twernertwerner The FreeType Project LICENSE ---------------------------- 2002-Apr-11 Copyright 1996-2002 by David Turner, Robert Wilhelm, and Werner Lemberg Introduction ============ The FreeType Project is distributed in several archive packages; some of them may contain, in addition to the FreeType font engine, various tools and contributions which rely on, or relate to, the FreeType Project. This license applies to all files found in such packages, and which do not fall under their own explicit license. The license affects thus the FreeType font engine, the test programs, documentation and makefiles, at the very least. This license was inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses, which all encourage inclusion and use of free software in commercial and freeware products alike. As a consequence, its main points are that: o We don't promise that this software works. However, we will be interested in any kind of bug reports. (`as is' distribution) o You can use this software for whatever you want, in parts or full form, without having to pay us. (`royalty-free' usage) o You may not pretend that you wrote this software. If you use it, or only parts of it, in a program, you must acknowledge somewhere in your documentation that you have used the FreeType code. (`credits') We specifically permit and encourage the inclusion of this software, with or without modifications, in commercial products. We disclaim all warranties covering The FreeType Project and assume no liability related to The FreeType Project. Finally, many people asked us for a preferred form for a credit/disclaimer to use in compliance with this license. We thus encourage you to use the following text: """ Portions of this software are copyright © 1996-2002 The FreeType Project (www.freetype.org). All rights reserved. """ Legal Terms =========== 0. Definitions -------------- Throughout this license, the terms `package', `FreeType Project', and `FreeType archive' refer to the set of files originally distributed by the authors (David Turner, Robert Wilhelm, and Werner Lemberg) as the `FreeType Project', be they named as alpha, beta or final release. `You' refers to the licensee, or person using the project, where `using' is a generic term including compiling the project's source code as well as linking it to form a `program' or `executable'. This program is referred to as `a program using the FreeType engine'. This license applies to all files distributed in the original FreeType Project, including all source code, binaries and documentation, unless otherwise stated in the file in its original, unmodified form as distributed in the original archive. If you are unsure whether or not a particular file is covered by this license, you must contact us to verify this. The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg. All rights reserved except as specified below. 1. No Warranty -------------- THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO USE, OF THE FREETYPE PROJECT. 2. Redistribution ----------------- This license grants a worldwide, royalty-free, perpetual and irrevocable right and license to use, execute, perform, compile, display, copy, create derivative works of, distribute and sublicense the FreeType Project (in both source and object code forms) and derivative works thereof for any purpose; and to authorize others to exercise some or all of the rights granted herein, subject to the following conditions: o Redistribution of source code must retain this license file (`FTL.TXT') unaltered; any additions, deletions or changes to the original files must be clearly indicated in accompanying documentation. The copyright notices of the unaltered, original files must be preserved in all copies of source files. o Redistribution in binary form must provide a disclaimer that states that the software is based in part of the work of the FreeType Team, in the distribution documentation. We also encourage you to put an URL to the FreeType web page in your documentation, though this isn't mandatory. These conditions apply to any software derived from or based on the FreeType Project, not just the unmodified files. If you use our work, you must acknowledge us. However, no fee need be paid to us. 3. Advertising -------------- Neither the FreeType authors and contributors nor you shall use the name of the other for commercial, advertising, or promotional purposes without specific prior written permission. We suggest, but do not require, that you use one or more of the following phrases to refer to this software in your documentation or advertising materials: `FreeType Project', `FreeType Engine', `FreeType library', or `FreeType Distribution'. As you have not signed this license, you are not required to accept it. However, as the FreeType Project is copyrighted material, only this license, or another one contracted with the authors, grants you the right to use, distribute, and modify it. Therefore, by using, distributing, or modifying the FreeType Project, you indicate that you understand and accept all the terms of this license. 4. Contacts ----------- There are two mailing lists related to FreeType: o freetype@freetype.org Discusses general use and applications of FreeType, as well as future and wanted additions to the library and distribution. If you are looking for support, start in this list if you haven't found anything to help you in the documentation. o devel@freetype.org Discusses bugs, as well as engine internals, design issues, specific licenses, porting, etc. o http://www.freetype.org Holds the current FreeType web page, which will allow you to download our latest development version and read online documentation. You can also contact us individually at: David Turner Robert Wilhelm Werner Lemberg --- end of LICENSE.TXT --- libisfreetype-java-5.3.20100629/javadoc/0000755000175000017500000000000011412336226017415 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/0000755000175000017500000000000011412336226017635 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/0000755000175000017500000000000011412336226020225 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/intarsys/0000755000175000017500000000000011412336226022101 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/intarsys/cwt/0000755000175000017500000000000011412336226022676 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/intarsys/cwt/freetype/0000755000175000017500000000000011412336226024521 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/intarsys/cwt/freetype/nativec/0000755000175000017500000000000011412336226026152 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/intarsys/cwt/freetype/nativec/windows-amd64/0000755000175000017500000000000011412336226030555 5ustar twernertwernerlibisfreetype-java-5.3.20100629/resource/de/intarsys/cwt/freetype/nativec/windows-x86/0000755000175000017500000000000011412336226030267 5ustar twernertwerner