Back to index

tetex-bin  3.0
Functions
out_ofm.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void output_ofm_file (void)
void out_ofm_4 (unsigned)
void out_ofm_2 (unsigned)
void out_ofm_char (unsigned)
void out_ofm_scaled (fix)
void out_ofm (unsigned)
void compute_ofm_subsizes (void)
void output_ofm_subsizes (void)
void output_ofm_header (void)
void output_ofm_extra_stuff (void)
void compute_ofm_character_info (void)
void output_ofm_character_info (void)

Function Documentation

Definition at line 794 of file char_routines.c.

{
    unsigned plane, index;
    unsigned c;
    char_entry *entry;

    bc = 0x7fffffff; ec=0;
    switch (ofm_level) {
        case OFM_TFM: {
            FOR_ALL_EXISTING_CHARACTERS(
                if (c < bc) bc = c;
                if (c > ec) ec = c;
            )
            break;
        }
        case OFM_LEVEL0: {
            FOR_ALL_EXISTING_CHARACTERS(
                if (c < bc) bc = c;
                if (c > ec) ec = c;
            )
            break;
        }
/* Level 1 only uses plane 0.  Take advantage of this fact. */
        case OFM_LEVEL1: {
            FOR_ALL_CHARACTERS(
                if (c < bc) bc = c;
                if (c > ec) ec = c;
            )
            break;
        }
        default: { internal_error_0("compute_ofm_character_info"); }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 58 of file out_ofm.c.

{
    switch(ofm_level) {
        case OFM_TFM: {
            lh = header_max + 1;
            if (bc > ec) bc = 1;
            if (ec>255)
                fatal_error_1(
                   "Char (%x) too big for TFM (max ff); use OFM file",ec);
            nw++; nh++; nd++; ni++;
            compute_ligkern_offset();
            lf = 6+lh+(ec-bc+1)+nw+nh+nd+ni+nl+lk_offset+nk+ne+np;
            /*lf = 6+lh+(ec-bc+1)+nw+nh+nd+ni+nl-1+lk_offset+nk+ne+np;*/
            break;
        }
        case OFM_LEVEL0: {
            lh = header_max + 1;
            if (ec>65535)
                fatal_error_1(
                "Char (%x) too big for OFM level-0 (max ffff); use level-2",
                ec);
            if (bc > ec) bc = 1;
            nw++; nh++; nd++; ni++;
            compute_ligkern_offset();
            lf = 14+lh+2*(ec-bc+1)+nw+nh+nd+ni+2*(nl+lk_offset)+nk+2*ne+np;
            break;
        }
        case OFM_LEVEL1: {
            lh = header_max + 1;
            if (ec>65535)
                fatal_error_1(
                "Char (%x) too big for OFM level-1 (max ffff); use level-2",
                ec);
            if (bc > ec) bc = 1;
            nw++; nh++; nd++; ni++;
            compute_ligkern_offset();
            lf = 29+lh+ncw+nw+nh+nd+ni+2*(nl+lk_offset)+nk+2*ne+np+
                 nki+nwi+nkf+nwf+nkm+nwm+nkr+nwr+nkg+nwg+nkp+nwp;
            nco = 29+lh+nki+nwi+nkf+nwf+nkm+nwm+nkr+nwr+nkg+nwg+nkp+nwp;
            break;
        }
        default: { internal_error_0("output_ofm_subfiles"); }
    }   
}

Here is the call graph for this function:

Here is the caller graph for this function:

void out_ofm ( unsigned  )

Definition at line 145 of file out_ofm.c.

{
    fputc(i,file_ofm);
    file_ofm_count++;
}

Here is the caller graph for this function:

void out_ofm_2 ( unsigned  )

Definition at line 152 of file out_ofm.c.

{
 
    fputc((i>>8)&0xff,  file_ofm);
    fputc(i&0xff,       file_ofm);
    file_ofm_count += 2;
}

Here is the caller graph for this function:

void out_ofm_4 ( unsigned  )

Definition at line 161 of file out_ofm.c.

{
    fputc((i>>24)&0xff, file_ofm);
    fputc((i>>16)&0xff, file_ofm);
    fputc((i>>8)&0xff,  file_ofm);
    fputc(i&0xff,       file_ofm);
    file_ofm_count += 4;
}

Here is the caller graph for this function:

void out_ofm_char ( unsigned  )

Definition at line 171 of file out_ofm.c.

{
    if (ofm_level == OFM_NOLEVEL) {
        internal_error_1("out_ofm_char.1 (ofm_level=%d)", ofm_level);
    }
    if (ofm_level == OFM_TFM) {
        if (i>=0x100) internal_error_1("out_ofm_char.2 (i=%x)", i);
        out_ofm(i);
    } else {
        if (i>=0x10000) internal_error_1("out_ofm_char.3 (i=%x)", i);
        out_ofm_2(i);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 188 of file out_ofm.c.

{
    if (dabs((double)fval/(double)design_units) >= 16.0) {
        warning_2("The relative dimension %d is too large.\n"
                  "Must be less than 16*designsize = %d designunits",
                  fval/0x100000, design_units/0x10000);
        fval = 0;
    }
    if (design_units != UNITY) {
        fval = zround(((double)fval/(double)design_units) * 1048576.0);
    }
    if (fval < 0) {
        out_ofm(255); fval = fval + 0x1000000;
        if (fval <= 0) fval = 1;
    } else {
        out_ofm(0);
        if (fval >= 0x1000000) fval = 0xffffff;
    }
    out_ofm((fval >> 16) & 0xff);
    out_ofm((fval >> 8) & 0xff);
    out_ofm(fval & 0xff);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 829 of file char_routines.c.

{
    unsigned plane, index;
    unsigned c;
    char_entry *entry;
    unsigned wd, ht, dp, ic;

    switch (ofm_level) {
        case OFM_TFM: {
            plane=0;
            for (index = bc; index <=ec; index++) {
                entry = planes[plane][index]; 
                c = plane*PLANE + index;
                if (entry == NULL) { 
                    out_ofm_4(0);
                } else {
                    if (entry->indices[C_WD] != NULL)
                        wd = entry->indices[C_WD]->index;
                    else wd = 0;
                    if (entry->indices[C_HT] != NULL)
                        ht = entry->indices[C_HT]->index;
                    else ht = 0;
                    if (entry->indices[C_DP] != NULL)
                        dp = entry->indices[C_DP]->index;
                    else dp = 0;
                    if (entry->indices[C_IC] != NULL)
                        ic = entry->indices[C_IC]->index;
                    else ic = 0;
                    out_ofm(wd);
                    out_ofm(ht*16 + dp);
                    out_ofm(ic*4 + entry->tag);
                    out_ofm(entry->remainder);
                }
            }
            break;
        }
        case OFM_LEVEL0: {
            plane=0;
            for (index = bc; index <=ec; index++) {
                entry = planes[plane][index]; 
                c = plane*PLANE + index;
                if (entry == NULL) { 
                    out_ofm_4(0); out_ofm_4(0);
                } else {
                    if (entry->indices[C_WD] != NULL)
                        wd = entry->indices[C_WD]->index;
                    else wd = 0;
                    if (entry->indices[C_HT] != NULL)
                        ht = entry->indices[C_HT]->index;
                    else ht = 0;
                    if (entry->indices[C_DP] != NULL)
                        dp = entry->indices[C_DP]->index;
                    else dp = 0;
                    if (entry->indices[C_IC] != NULL)
                        ic = entry->indices[C_IC]->index;
                    else ic = 0;
                    out_ofm_2(wd);
                    out_ofm(ht);
                    out_ofm(dp);
                    out_ofm(ic);
                    out_ofm(entry->tag);
                    out_ofm_2(entry->remainder);
                }
            }
            break;
        }
        case OFM_LEVEL1: {
            internal_error_0("OFM level 1 not currently supported");
            break;
        }
        default: { internal_error_0("compute_ofm_character_info"); }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 123 of file extra_routines.c.

{
    if (ofm_level >= OFM_LEVEL1) {
        fatal_error_0("OFM level 1 not currently supported");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 618 of file header_routines.c.

{
    unsigned i=0, j, k1, k2;

    av_list L = header_list;

    out_ofm_4(check_sum); i++;
    out_ofm_4(design_size); i++;
    k1 = strlen(coding_scheme);
    out_ofm(k1);
    for (j=0; j<k1; j++) out_ofm(coding_scheme[j]);
    for (j=k1; j<LEN_CODING_SCHEME; j++) out_ofm(0); 
    k2 = strlen(family);
    out_ofm(k2);
    for (j=0; j<k2; j++) out_ofm(family[j]);
    for (j=k2; j<LEN_FAMILY; j++) out_ofm(0); 
    if ((ofm_level==OFM_TFM) && (seven_bit_specified==TRUE))
      out_ofm(seven_bit);
    else
      out_ofm(0);
    out_ofm(0); out_ofm(0); out_ofm(face);
    i = 1 + LOC_SEVEN_FLAG / 4;
    lh = header_max + 1;
    while(L != NULL) {
       j=lattr(L);
       while (i<j) {
           out_ofm_4(0);
           i++;
       }
       out_ofm_4(lval(L));
       L = L->ptr; i++;
    }
    while (i<lh) {out_ofm_4(0); i++;}
}

Here is the call graph for this function:

Here is the caller graph for this function: