cr-fonts.c revision 0489e8dae1154191b4fa0931545298513034ff38
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
/*
* This file is part of The Croco Library
*
*
* modify it under the terms of version 2.1 of
* the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program 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 for more details.
*
* You should have received a copy of the
* GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*See COPYRIGHTS file for copyright information
*/
#include "cr-fonts.h"
#include <string.h>
static enum CRStatus
{
if (!*a_string) {
}
if (!a_this) {
return CR_OK;
}
case FONT_FAMILY_SANS_SERIF:
break;
case FONT_FAMILY_SERIF:
break;
case FONT_FAMILY_CURSIVE:
break;
case FONT_FAMILY_FANTASY:
break;
case FONT_FAMILY_MONOSPACE:
break;
case FONT_FAMILY_NON_GENERIC:
break;
default:
break;
}
if (name) {
} else {
}
}
}
return result;
}
static const gchar *
{
switch (a_code) {
case FONT_SIZE_XX_SMALL:
break;
case FONT_SIZE_X_SMALL:
break;
case FONT_SIZE_SMALL:
break;
case FONT_SIZE_MEDIUM:
break;
case FONT_SIZE_LARGE:
break;
case FONT_SIZE_X_LARGE:
break;
case FONT_SIZE_XX_LARGE:
break;
default:
}
return str;
}
static const gchar *
{
switch (a_code) {
case FONT_SIZE_LARGER:
break;
case FONT_SIZE_SMALLER:
break;
default:
break;
}
return str;
}
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
return result;
}
guchar *
{
if (!a_this) {
}
&stringue);
} else {
if (stringue) {
}
}
}
enum CRStatus
{
/*
*only non generic font families can have a name
*/
return CR_BAD_PARAM_ERROR;
}
}
return CR_OK;
}
{
if (!a_this)
return a_family_to_append;
return a_this;
}
{
if (!a_this)
return a_family_to_prepend;
return a_family_to_prepend;
}
enum CRStatus
{
}
}
}
}
return CR_OK;
}
/***************************************************
*'font-size' manipulation functions definitions
***************************************************/
cr_font_size_new (void)
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
return result;
}
enum CRStatus
{
case RELATIVE_FONT_SIZE:
case INHERITED_FONT_SIZE:
break;
case ABSOLUTE_FONT_SIZE:
break;
default:
return CR_UNKNOWN_TYPE_ERROR;
}
return CR_OK;
}
enum CRStatus
{
case RELATIVE_FONT_SIZE:
case INHERITED_FONT_SIZE:
break;
case ABSOLUTE_FONT_SIZE:
break;
default:
return CR_UNKNOWN_TYPE_ERROR;
}
return CR_OK;
}
enum CRStatus
{
return CR_OK ;
}
enum CRStatus
enum CRRelativeFontSize a_relative)
{
return CR_OK ;
}
enum CRStatus
enum CRNumType a_num_type,
{
a_value, a_num_type) ;
return CR_OK ;
}
enum CRStatus
{
return CR_OK ;
}
{
}
gchar *
{
if (!a_this) {
return str;
}
break;
case ABSOLUTE_FONT_SIZE:
break;
case RELATIVE_FONT_SIZE:
break;
case INHERITED_FONT_SIZE:
break;
default:
break;
}
return str;
}
void
{
switch (a_font_size) {
case FONT_SIZE_XX_SMALL:
break ;
case FONT_SIZE_X_SMALL:
break ;
case FONT_SIZE_SMALL:
break ;
case FONT_SIZE_MEDIUM:
break ;
case FONT_SIZE_LARGE:
break ;
case FONT_SIZE_X_LARGE:
break ;
case FONT_SIZE_XX_LARGE:
break ;
case FONT_SIZE_INHERIT:
cr_utils_trace_info ("can't return a smaller size for FONT_SIZE_INHERIT") ;
break ;
default:
cr_utils_trace_info ("Unknown FONT_SIZE") ;
break ;
}
*a_smaller_size = result ;
}
void
{
switch (a_font_size) {
case FONT_SIZE_XX_SMALL:
break ;
case FONT_SIZE_X_SMALL:
break ;
case FONT_SIZE_SMALL:
break ;
case FONT_SIZE_MEDIUM:
break ;
case FONT_SIZE_LARGE:
break ;
case FONT_SIZE_X_LARGE:
break ;
case FONT_SIZE_XX_LARGE:
break ;
case FONT_SIZE_INHERIT:
cr_utils_trace_info ("can't return a bigger size for FONT_SIZE_INHERIT") ;
break ;
default:
cr_utils_trace_info ("Unknown FONT_SIZE") ;
break ;
}
*a_larger_size = result ;
}
{
if ((unsigned)a_font_size < NB_PREDEFINED_ABSOLUTE_FONT_SIZES) {
return TRUE ;
} else {
return FALSE ;
}
}
gchar *
{
if (!a_this) {
return str;
}
case FONT_SIZE_ADJUST_NONE:
break;
case FONT_SIZE_ADJUST_NUMBER:
else
break;
case FONT_SIZE_ADJUST_INHERIT:
}
return str;
}
const gchar *
{
switch (a_code) {
case FONT_STYLE_NORMAL:
break;
case FONT_STYLE_ITALIC:
break;
case FONT_STYLE_OBLIQUE:
break;
case FONT_STYLE_INHERIT:
break;
default:
break;
}
return str;
}
const gchar *
{
switch (a_code) {
case FONT_VARIANT_NORMAL:
break;
case FONT_VARIANT_SMALL_CAPS:
break;
case FONT_VARIANT_INHERIT:
break;
}
return str;
}
enum CRFontWeight
{
if (a_weight >= NB_FONT_WEIGHTS) {
return FONT_WEIGHT_900 ;
} else if (a_weight < FONT_WEIGHT_NORMAL) {
return FONT_WEIGHT_NORMAL ;
} else if (a_weight == FONT_WEIGHT_BOLDER
|| a_weight == FONT_WEIGHT_BOLDER) {
cr_utils_trace_info ("FONT_WEIGHT_BOLDER or FONT_WEIGHT_LIGHTER should not appear here") ;
return FONT_WEIGHT_NORMAL ;
} else {
}
}
const gchar *
{
switch (a_code) {
case FONT_WEIGHT_NORMAL:
break;
case FONT_WEIGHT_BOLD:
break;
case FONT_WEIGHT_BOLDER:
break;
case FONT_WEIGHT_LIGHTER:
break;
case FONT_WEIGHT_100:
break;
case FONT_WEIGHT_200:
break;
case FONT_WEIGHT_300:
break;
case FONT_WEIGHT_400:
break;
case FONT_WEIGHT_500:
break;
case FONT_WEIGHT_600:
break;
case FONT_WEIGHT_700:
break;
case FONT_WEIGHT_800:
break;
case FONT_WEIGHT_900:
break;
case FONT_WEIGHT_INHERIT:
break;
default:
break;
}
return str;
}
const gchar *
{
switch (a_code) {
case FONT_STRETCH_NORMAL:
break;
case FONT_STRETCH_WIDER:
break;
case FONT_STRETCH_NARROWER:
break;
break;
break;
case FONT_STRETCH_CONDENSED:
break;
break;
break;
case FONT_STRETCH_EXPANDED:
break;
break;
break;
case FONT_STRETCH_INHERIT:
break;
}
return str;
}
void
{
g_free (a_font_size) ;
}
/*******************************************************
*'font-size-adjust' manipulation function definition
*******************************************************/
cr_font_size_adjust_new (void)
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
return result;
}
void
{
}
}