User account creation filtered due to spam.

View | Details | Raw Unified | Return to bug 38473
Collapse All | Expand All

(-)gnu/java/awt/peer/gtk/FreetypeGlyphVector.java (-1 / +5 lines)
Lines 559-567 Link Here
559
   */
559
   */
560
  public Shape getOutline()
560
  public Shape getOutline()
561
  {
561
  {
562
    System.out.println("Retrieving outline for " + font);
562
    GeneralPath path = new GeneralPath();
563
    GeneralPath path = new GeneralPath();
563
    for( int i = 0; i < getNumGlyphs(); i++ )
564
    for( int i = 0; i < getNumGlyphs(); i++ )
564
      path.append(getGlyphOutline(i), false);
565
      {
566
	System.out.println("Retrieving glyph " + i);
567
	path.append(getGlyphOutline(i), false);
568
      }
565
    return path;
569
    return path;
566
  }
570
  }
567
571
(-)gnu/java/awt/peer/gtk/GdkFontPeer.java (+1 lines)
Lines 249-254 Link Here
249
  public GdkFontPeer (String name, int style, int size)
249
  public GdkFontPeer (String name, int style, int size)
250
  {  
250
  {  
251
    super(name, style, size);    
251
    super(name, style, size);    
252
    System.out.println("GdkFontPeer(" + name + "," + style + "," + size + ")");
252
    initState ();
253
    initState ();
253
    setFont (this.familyName, this.style, (int)this.size);
254
    setFont (this.familyName, this.style, (int)this.size);
254
    metricsCache = new HashMap<Integer,GlyphMetrics>();
255
    metricsCache = new HashMap<Integer,GlyphMetrics>();
(-)native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c (+50 lines)
Lines 248-259 Link Here
248
  env = path->env;
248
  env = path->env;
249
  obj = path->obj;
249
  obj = path->obj;
250
250
251
  printf("Entering _moveTo(%p,%p)\n",to,p);
251
  values[0].f = (jfloat)(to->x * path->sx + path->px);
252
  values[0].f = (jfloat)(to->x * path->sx + path->px);
252
  values[1].f = (jfloat)(to->y * path->sy + path->py);
253
  values[1].f = (jfloat)(to->y * path->sy + path->py);
253
254
254
  cls = (*env)->FindClass (env, "java/awt/geom/GeneralPath");
255
  cls = (*env)->FindClass (env, "java/awt/geom/GeneralPath");
255
  method = (*env)->GetMethodID (env, cls, "moveTo", "(FF)V");
256
  method = (*env)->GetMethodID (env, cls, "moveTo", "(FF)V");
256
  (*env)->CallVoidMethodA(env, obj, method, values );
257
  (*env)->CallVoidMethodA(env, obj, method, values );
258
  printf("Leaving _moveTo(%p,%p)\n",to,p);
257
259
258
  return 0;
260
  return 0;
259
}
261
}
Lines 268-273 Link Here
268
  jvalue values[2];
270
  jvalue values[2];
269
  generalpath *path = (generalpath *) p;
271
  generalpath *path = (generalpath *) p;
270
272
273
  printf("Entering _lineTo(%p,%p)\n",to,p);
271
  env = path->env;
274
  env = path->env;
272
  obj = path->obj; 
275
  obj = path->obj; 
273
  values[0].f = (jfloat)(to->x * path->sx + path->px);
276
  values[0].f = (jfloat)(to->x * path->sx + path->px);
Lines 277-282 Link Here
277
  method = (*env)->GetMethodID (env, cls, "lineTo", "(FF)V");
280
  method = (*env)->GetMethodID (env, cls, "lineTo", "(FF)V");
278
  (*env)->CallVoidMethodA(env, obj, method, values );
281
  (*env)->CallVoidMethodA(env, obj, method, values );
279
282
283
  printf("Leaving _lineTo(%p,%p)\n",to,p);
280
  return 0;
284
  return 0;
281
}
285
}
282
286
Lines 291-296 Link Here
291
  jvalue values[4];
295
  jvalue values[4];
292
  generalpath *path = (generalpath *) p;
296
  generalpath *path = (generalpath *) p;
293
297
298
  printf("Entering _quadTo(%p,%p,%p)\n",cp,to,p);
294
  env = path->env;
299
  env = path->env;
295
  obj = path->obj;
300
  obj = path->obj;
296
  values[0].f = (jfloat)(cp->x * path->sx + path->px);
301
  values[0].f = (jfloat)(cp->x * path->sx + path->px);
Lines 302-307 Link Here
302
  method = (*env)->GetMethodID (env, cls, "quadTo", "(FFFF)V");
307
  method = (*env)->GetMethodID (env, cls, "quadTo", "(FFFF)V");
303
  (*env)->CallVoidMethodA(env, obj, method, values );
308
  (*env)->CallVoidMethodA(env, obj, method, values );
304
309
310
  printf("Leaving _quadTo(%p,%p,%p)\n",cp,to,p);
305
  return 0;
311
  return 0;
306
}
312
}
307
313
Lines 317-322 Link Here
317
  jvalue values[6];
323
  jvalue values[6];
318
  generalpath *path = (generalpath *) p;
324
  generalpath *path = (generalpath *) p;
319
325
326
  printf("Entering _curveTo(%p,%p,%p,%p)\n",cp1,cp2,to,p);
320
  env = path->env;
327
  env = path->env;
321
  obj = path->obj;
328
  obj = path->obj;
322
  values[0].f = (jfloat)(cp1->x * path->sx + path->px);
329
  values[0].f = (jfloat)(cp1->x * path->sx + path->px);
Lines 330-335 Link Here
330
  method = (*env)->GetMethodID (env, cls, "curveTo", "(FFFFFF)V");
337
  method = (*env)->GetMethodID (env, cls, "curveTo", "(FFFFFF)V");
331
  (*env)->CallVoidMethodA(env, obj, method, values );
338
  (*env)->CallVoidMethodA(env, obj, method, values );
332
339
340
  printf("Leaving _curveTo(%p,%p,%p,%p)\n",cp1,cp2,to,p);
341
 
333
  return 0;
342
  return 0;
334
}
343
}
335
344
Lines 352-360 Link Here
352
  PangoFcFont *font;
361
  PangoFcFont *font;
353
  FT_Face ft_face;
362
  FT_Face ft_face;
354
  FT_Glyph glyph;
363
  FT_Glyph glyph;
364
  int a;
355
365
356
  font = JLONG_TO_PTR(PangoFcFont, fnt);
366
  font = JLONG_TO_PTR(PangoFcFont, fnt);
367
  printf("glyphIndex: %d, font: %p\n", glyphIndex, font);
357
  ft_face = pango_fc_font_lock_face( font );
368
  ft_face = pango_fc_font_lock_face( font );
369
  printf("Get glyph for %s\n", ft_face->family_name);
358
370
359
  g_assert (ft_face != NULL);
371
  g_assert (ft_face != NULL);
360
372
Lines 385-392 Link Here
385
    }
397
    }
386
398
387
  FT_Get_Glyph( ft_face->glyph, &glyph );
399
  FT_Get_Glyph( ft_face->glyph, &glyph );
400
  switch (glyph->format)
401
    {
402
    case FT_GLYPH_FORMAT_NONE:
403
      printf("Glyph format is none.\n");
404
      break;
405
    case FT_GLYPH_FORMAT_COMPOSITE:
406
      printf("Glyph format is composite.\n");
407
      break;
408
    case FT_GLYPH_FORMAT_BITMAP:
409
      printf("Glyph format is bitmap.\n");
410
      break;
411
    case FT_GLYPH_FORMAT_OUTLINE:
412
      printf("Glyph format is outline.\n");
413
      break;
414
    case FT_GLYPH_FORMAT_PLOTTER:
415
      printf("Glyph format is plotter.\n");
416
      break;
417
    }
418
  printf("Calling FT_Outline_Decompose with outline %p, callbacks %p and path %p\n",
419
	 &(((FT_OutlineGlyph)glyph)->outline), &ftCallbacks, path);
420
  printf("Outline: %d contours (%p), %d points (%p), %d flags\n",
421
	 ((FT_OutlineGlyph)glyph)->outline.n_contours,
422
	 ((FT_OutlineGlyph)glyph)->outline.contours,
423
	 ((FT_OutlineGlyph)glyph)->outline.n_points,
424
	 ((FT_OutlineGlyph)glyph)->outline.points,
425
	 ((FT_OutlineGlyph)glyph)->outline.flags);
426
  for (a = 0; a < ((FT_OutlineGlyph)glyph)->outline.n_points; ++a)
427
    {
428
      printf("Point %d: x = %ld, y = %ld\n", a,
429
	     ((FT_OutlineGlyph)glyph)->outline.points[a].x,
430
	     ((FT_OutlineGlyph)glyph)->outline.points[a].y);
431
    }
432
  for (a = 0; a < ((FT_OutlineGlyph)glyph)->outline.n_contours; ++a)
433
    {
434
      printf("Contour %d = %d\n", a,
435
	     ((FT_OutlineGlyph)glyph)->outline.contours[a]);
436
    }
388
  FT_Outline_Decompose (&(((FT_OutlineGlyph)glyph)->outline),
437
  FT_Outline_Decompose (&(((FT_OutlineGlyph)glyph)->outline),
389
			&ftCallbacks, path);
438
			&ftCallbacks, path);
439
  printf("Finished decomposing\n");
390
  FT_Done_Glyph( glyph );
440
  FT_Done_Glyph( glyph );
391
  
441
  
392
  pango_fc_font_unlock_face( font );
442
  pango_fc_font_unlock_face( font );

Return to bug 38473