native_metrics[FONT_METRICS_HEIGHT] = font->GetHeight();
void Java_vdr_mhp_awt_MHPFontPeer_getFontMetrics(JNIEnv* env, jobject obj, jlong nativeData, jdoubleArray java_metrics) {   IDirectFBFont *font = (IDirectFBFont *)nativeData;   jdouble *native_metrics;   //DFBRectangle logicalRectangle;      if (!font) {      JNI::Exception::Throw(JNI::JavaLangNullPointerException, "IDirectFBFont is NULL");      return;   }      native_metrics          = env->GetDoubleArrayElements (java_metrics, NULL);   native_metrics[FONT_METRICS_ASCENT] = font->GetAscender();         // = PANGO_PIXELS (pango_font_metrics_get_ascent (pango_metrics));   native_metrics[FONT_METRICS_MAX_ASCENT]           = native_metrics[FONT_METRICS_ASCENT];   native_metrics[FONT_METRICS_DESCENT] = font->GetDescender();         // = PANGO_PIXELS (pango_font_metrics_get_descent (pango_metrics));   if (native_metrics[FONT_METRICS_DESCENT] < 0)      native_metrics[FONT_METRICS_DESCENT]             = - native_metrics[FONT_METRICS_DESCENT];   native_metrics[FONT_METRICS_MAX_DESCENT]           = native_metrics[FONT_METRICS_DESCENT];   native_metrics[FONT_METRICS_MAX_ADVANCE] = font->GetMaxAdvance();         //= PANGO_PIXELS (pango_font_metrics_get_approximate_char_width (pango_metrics));	    env->ReleaseDoubleArrayElements (java_metrics, native_metrics, 0);}