Subversion Repositories Kolibri OS

Rev

Rev 1892 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1892 Rev 3959
Line 281... Line 281...
281
    }
281
    }
282
    if (start < end)
282
    if (start < end)
283
	    parse_field (props, start, end - start);
283
	    parse_field (props, start, end - start);
284
}
284
}
Line 285... Line 285...
285
 
285
 
286
static cairo_status_t
286
static twin_face_properties_t *
287
twin_font_face_create_properties (cairo_font_face_t *twin_face,
-
 
288
				  twin_face_properties_t **props_out)
287
twin_font_face_create_properties (cairo_font_face_t *twin_face)
289
{
288
{
290
    twin_face_properties_t *props;
-
 
Line 291... Line 289...
291
    cairo_status_t status;
289
    twin_face_properties_t *props;
292
 
290
 
293
    props = malloc (sizeof (twin_face_properties_t));
291
    props = malloc (sizeof (twin_face_properties_t));
Line 294... Line 292...
294
    if (unlikely (props == NULL))
292
    if (unlikely (props == NULL))
295
	return _cairo_error (CAIRO_STATUS_NO_MEMORY);
293
	return NULL;
296
 
294
 
297
    props->stretch  = TWIN_STRETCH_NORMAL;
295
    props->stretch  = TWIN_STRETCH_NORMAL;
298
    props->slant = CAIRO_FONT_SLANT_NORMAL;
296
    props->slant = CAIRO_FONT_SLANT_NORMAL;
Line 299... Line 297...
299
    props->weight = TWIN_WEIGHT_NORMAL;
297
    props->weight = TWIN_WEIGHT_NORMAL;
300
    props->monospace = FALSE;
298
    props->monospace = FALSE;
301
    props->smallcaps = FALSE;
299
    props->smallcaps = FALSE;
302
 
-
 
303
    status = cairo_font_face_set_user_data (twin_face,
300
 
304
					    &twin_properties_key,
301
    if (unlikely (cairo_font_face_set_user_data (twin_face,
305
					    props, free);
302
					    &twin_properties_key,
Line 306... Line -...
306
    if (unlikely (status)) {
-
 
307
	free (props);
303
					    props, free))) {
308
	return status;
-
 
309
    }
-
 
310
 
304
	free (props);
Line 311... Line 305...
311
    if (props_out)
305
	return NULL;
312
	*props_out = props;
306
    }
313
 
307
 
314
    return CAIRO_STATUS_SUCCESS;
308
    return props;
315
}
-
 
316
 
309
}
Line 317... Line 310...
317
static cairo_status_t
310
 
318
twin_font_face_set_properties_from_toy (cairo_font_face_t *twin_face,
311
static cairo_status_t
319
					cairo_toy_font_face_t *toy_face)
312
twin_font_face_set_properties_from_toy (cairo_font_face_t *twin_face,
Line 320... Line 313...
320
{
313
					cairo_toy_font_face_t *toy_face)
321
    cairo_status_t status;
314
{
322
    twin_face_properties_t *props;
315
    twin_face_properties_t *props;
323
 
316
 
Line 727... Line 720...
727
 
720
 
728
cairo_font_face_t *
721
cairo_font_face_t *
729
_cairo_font_face_twin_create_fallback (void)
722
_cairo_font_face_twin_create_fallback (void)
730
{
723
{
731
    cairo_font_face_t *twin_font_face;
-
 
Line 732... Line 724...
732
    cairo_status_t status;
724
    cairo_font_face_t *twin_font_face;
733
 
725
 
734
    twin_font_face = _cairo_font_face_twin_create_internal ();
-
 
735
    status = twin_font_face_create_properties (twin_font_face, NULL);
726
    twin_font_face = _cairo_font_face_twin_create_internal ();
736
    if (status) {
727
    if (! twin_font_face_create_properties (twin_font_face)) {
737
	cairo_font_face_destroy (twin_font_face);
728
	cairo_font_face_destroy (twin_font_face);
Line 738... Line 729...
738
	return (cairo_font_face_t *) &_cairo_font_face_nil;
729
	return (cairo_font_face_t *) &_cairo_font_face_nil;