- for (j = 0, smallest = 0; j < sizes_idx; j++)
- {
- size = sizes[j];
- if (size <= 32)
- {
- if (size != 0)
- {
- if (smallest == 0)
- smallest = largest = size;
- else if (size < smallest)
- smallest = size;
- else if (size > largest)
- largest = size;
- SET_SIZE (size_bits, size);
- }
- }
- else
- {
- font.core.property[MFONT_SIZE] = size * 10;
- font.sizes = 0;
- MLIST_APPEND1 (xfont_table, fonts, font, MERROR_WIN);
- }
- }
-
- if (size_bits || have_scalable == 1)
- {
- font.sizes = size_bits;
- font.smallest = smallest;
- font.largest = largest;
- font.core.property[MFONT_SIZE] = have_scalable ? 0 : smallest * 10;
- MLIST_APPEND1 (xfont_table, fonts, font, MERROR_WIN);
- }
- if (! bfont
- || (font.core.property[MFONT_FOUNDRY]
- != bfont->property[MFONT_FOUNDRY])
- || (font.core.property[MFONT_FAMILY]
- != bfont->property[MFONT_FAMILY]))
- {
- MSTRUCT_MALLOC (bfont, MERROR_WIN);
- *bfont = font.core;
- for (j = MFONT_WEIGHT; j <= MFONT_ADSTYLE; j++)
- bfont->property[j] = 0;
- bfont->property[MFONT_SIZE] = bfont->property[MFONT_RESY] = 0;
- mplist_push (base_font_list, family, bfont);
- }
+ font.type = MFONT_TYPE_OBJECT;
+ font.source = MFONT_SOURCE_X;
+ MSTRUCT_CALLOC (fontx, MERROR_WIN);
+ fontx->core = font;
+ fontx->core.size = smallest * 10;
+ fontx->next = MPLIST_VAL (p);
+ MPLIST_VAL (p) = fontx;
+ if (smallest > 0)
+ for (j = 0; j < nsizes; j++)
+ {
+ if (sizes[j] <= 36)
+ {
+ if (sizes[j] != smallest)
+ SET_SIZE (fontx, sizes[j]);
+ }
+ else
+ {
+ MSTRUCT_CALLOC (fontx2, MERROR_WIN);
+ fontx2->core = font;
+ fontx2->core.size = sizes[j] * 10;
+ fontx2->next = MPLIST_VAL (p);
+ MPLIST_VAL (p) = fontx2;
+ }
+ }