/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* Header for class sun_font_SunLayoutEngine */
#include <jni_util.h>
#include <stdlib.h>
#include "FontInstanceAdapter.h"
#include "LayoutEngine.h"
#include "sun_font_SunLayoutEngine.h"
#include "sunfontids.h"
}
}
if (!gvdClass) {
return;
}
if (!gvdClass) {
return;
}
if (!gvdCountFID) {
gvdClass = 0;
return;
}
if (!gvdFlagsFID) {
gvdClass = 0;
return;
}
if (!gvdGlyphsFID) {
gvdClass = 0;
return;
}
if (!gvdPositionsFID) {
gvdClass = 0;
return;
}
if (!gvdIndicesFID) {
gvdClass = 0;
return;
}
}
int putGV(JNIEnv* env, jint gmask, jint baseIndex, jobject gvdata, const LayoutEngine* engine, int glyphCount) {
if (IS_NULL(glyphArray)) {
return 0;
}
return 0;
}
if (IS_NULL(glyphArray)) {
return 0;
}
return 0;
}
int countDelta = 0;
// le_uint32 is the same size as jint... forever, we hope
if (glyphs) {
if (positions) {
if (indices) {
// !!! need engine->getFlags to signal positions, indices data
/* "0" arg used instead of JNI_COMMIT as we want the carray
* to be freed by any VM that actually passes us a copy.
*/
}
}
}
if (countDelta) {
count += countDelta;
}
return 1;
}
/*
* Class: sun_font_SunLayoutEngine
* Method: nativeLayout
* Signature: (Lsun/font/FontStrike;[CIIIIZLjava/awt/geom/Point2D$Float;Lsun/font/GlyphLayout$GVData;)V
*/
{
// fprintf(stderr, "nl font: %x strike: %x script: %d\n", font2d, strike, script); fflush(stderr);
FontInstanceAdapter fia(env, font2d, strike, mat, 72, 72, (le_int32) upem, (TTLayoutTableCache *) layoutTables);
LayoutEngine *engine = LayoutEngine::layoutEngineFactory(&fia, script, lang, typo_flags & TYPO_MASK, success);
// have to copy, yuck, since code does upcalls now. this will be soooo slow
if (len > 256) {
return;
}
if (chars == 0) {
return;
}
}
// fprintf(stderr, "nl chars: %x text: %x min %d len %d typo %x\n", chars, text, min, len, typo_flags); fflush(stderr);
jfloat x, y;
// fprintf(stderr, "sle nl len %d -> gc: %d\n", len, glyphCount); fflush(stderr);
// fprintf(stderr, "layout glyphs: %d x: %g y: %g\n", glyphCount, x, y); fflush(stderr);
if (LE_FAILURE(success)) {
} else {
// !!! hmmm, could use current value in positions array of GVData...
}
}
}
delete engine;
}