This commit is contained in:
purplerain 2024-10-06 22:33:21 +00:00
parent ac06c97e30
commit f3c6f98243
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
19 changed files with 118 additions and 114 deletions

View File

@ -25,7 +25,7 @@ build:
build:
umask ${WOBJUMASK}; exec ${MAKE} do-build
do-build:
do-build:
@if [[ `id -u` -ne 0 ]]; then \
echo $@ must be called by root >&2; \
false; \

View File

@ -1,6 +1,6 @@
#
#
# Copyright 2005 Red Hat, Inc.
#
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR

View File

@ -1,5 +1,5 @@
/*
*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
@ -54,8 +54,8 @@ usage (int exitval)
}
/* stolen from Xlib Xrm.c */
static void
PrintBindingQuarkList(XrmBindingList bindings,
static void
PrintBindingQuarkList(XrmBindingList bindings,
XrmQuarkList quarks,
FILE* stream)
{
@ -75,12 +75,12 @@ PrintBindingQuarkList(XrmBindingList bindings,
/* stolen from Xlib Xrm.c */
/* output out the entry in correct file syntax */
/*ARGSUSED*/
static Bool
DumpEntry(XrmDatabase *db,
XrmBindingList bindings,
XrmQuarkList quarks,
XrmRepresentation *type,
XrmValuePtr value,
static Bool
DumpEntry(XrmDatabase *db,
XrmBindingList bindings,
XrmQuarkList quarks,
XrmRepresentation *type,
XrmValuePtr value,
XPointer data)
{
FILE *stream = (FILE *)data;

View File

@ -1,6 +1,6 @@
dnl Copyright 2005 Red Hat, Inc.
dnl
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
dnl
dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR

View File

@ -1,6 +1,6 @@
#
#
# Copyright 2005 Red Hat, Inc.
#
#
# Permission to use, copy, modify, distribute, and sell this software
# and its documentation for any purpose is hereby granted without fee,
# provided that the above copyright notice appear in all copies and that
@ -10,7 +10,7 @@
# without specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any
# purpose. It is provided "as is" without express or implied warranty.
#
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
# NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR

View File

@ -208,6 +208,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:SecBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-secbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;

View File

@ -1363,7 +1363,7 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -bitrig* | -openbsd* | -secbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \

View File

@ -1,5 +1,5 @@
dnl Copyright 2005 Red Hat, Inc.
dnl
dnl
dnl Permission to use, copy, modify, distribute, and sell this software
dnl and its documentation for any purpose is hereby granted without fee,
dnl provided that the above copyright notice appear in all copies and
@ -9,7 +9,7 @@ dnl advertising or publicity pertaining to distribution of the software
dnl without specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any
dnl purpose. It is provided "as is" without express or implied warranty.
dnl
dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
dnl NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR

View File

@ -1,7 +1,7 @@
# $Id: Makefile.am,v 1.7 2023/04/10 15:20:48 matthieu Exp $
#
#
# Copyright 2005 Red Hat, Inc.
#
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@ -11,7 +11,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR

View File

@ -141,7 +141,7 @@ Draw (Moving *mp, int n)
{
XPoint xp[MAX_POINTS];
int i;
for (i = 0; i < n; i++)
for (i = 0; i < n; i++)
{
xp[i].x = mp[i].x; xp[i].y = mp[i].y;
}
@ -242,7 +242,7 @@ Timeout (XtPointer closure, XtIntervalId *id)
}
}
static void
static void
StartSaver (void)
{
if (screen_saved)
@ -261,13 +261,13 @@ StopSaver (void)
screen_saved = False;
}
static int
static int
ignoreError (Display *dpy, XErrorEvent *error)
{
return 0;
}
int
int
main(int argc, char *argv[])
{
Widget toplevel;
@ -348,14 +348,14 @@ main(int argc, char *argv[])
saver = info->window;
if (info->state == ScreenSaverOn)
{
if (info->kind != ScreenSaverExternal)
if (info->kind != ScreenSaverExternal)
{
XResetScreenSaver (display);
XActivateScreenSaver (display);
}
StartSaver ();
}
for (;;)
for (;;)
{
XtAppNextEvent (app_con, &event);
if (event.type == ss_event) {

View File

@ -735,7 +735,7 @@ kbfunc_menu_ssh(void *ctx, struct cargs *cargs)
buf = lbuf;
if (buf[slen - 1] == '\n')
buf[slen - 1] = '\0';
/* skip hashed hosts */
if (strncmp(buf, HASH_MARKER, strlen(HASH_MARKER)) == 0)
continue;

View File

@ -210,7 +210,7 @@ menu_complete_path(struct menu_ctx *mc)
else if (!mr->abort)
strlcpy(mr->text, mc->searchstr, sizeof(mr->text));
}
menuq_clear(&menuq);
return mr;

View File

@ -71,7 +71,7 @@ static Event * BuildEvent ( ProtocolStream * stream );
static void FreeEvent ( Event * event );
static char * DispatchEvent ( Event * event );
/* Function Name: ClientTimedOut
* Description: Called if the client takes too long to take our selection.
@ -96,7 +96,7 @@ ClientTimedOut(XtPointer data, XtIntervalId *id)
SetMessage(global_screen_data.info_label, msg);
}
/* Function Name: GetClientWindow
* Description: Gets the Client's window by asking the user.
@ -169,7 +169,7 @@ GetClientWindow(Widget w, int *x, int *y)
return(XmuClientWindow(dpy, target_win));
}
/* Function Name: SetCommand
* Description: Causes this widget to own the resource editor's
@ -244,7 +244,7 @@ SetCommand(Widget w, ResCommand command, String msg)
ClientTimedOut, (XtPointer) w);
}
/* Function Name: TellUserAboutMessage
* Description: Informs the user that we have sent a message to the client
@ -285,7 +285,7 @@ TellUserAboutMessage(Widget label, ResCommand command)
SetMessage(label, msg);
}
/* Function Name: ConvertCommand
* Description: Converts the command string into a selection that can
@ -310,7 +310,7 @@ ConvertCommand(Widget w, Atom *selection, Atom *target, Atom *type_ret,
return(TRUE);
}
/* Function Name: SelectionDone
* Description: done with the selection.
@ -325,7 +325,7 @@ SelectionDone(Widget w, Atom *sel, Atom *targ)
/* Keep the toolkit from automatically freeing the selection value */
}
/* Function Name: LoseSelection
* Description: Called when we have lost the selection, asks client
@ -347,7 +347,7 @@ LoseSelection(Widget w, Atom *sel)
NULL, XtLastTimestampProcessed(XtDisplay(w)));
}
/* Function Name: GetClientValue
* Description: Gets the value out of the client, and does good things
@ -459,7 +459,7 @@ GetClientValue(Widget w, XtPointer data, Atom *selection, Atom *type,
XtFree(error_str);
}
/* Function Name: BuildHeader
* Description: Puts the header into the message.
@ -529,7 +529,7 @@ BuildHeader(CurrentClient *client_data)
stream->size = old_size;
}
/* Function Name: BuildEvent
* Description: Builds the event structure from the
@ -758,7 +758,7 @@ BuildEvent(ProtocolStream *stream)
return(NULL);
}
/* Function Name: FreeEvent
* Description: Frees all memory associated with the event.
@ -860,7 +860,7 @@ FreeEvent(Event *event)
}
}
/* Function Name: DispatchEvent
* Description: Handles the event, calling the proper function.
@ -903,7 +903,7 @@ DispatchEvent(Event *event)
return(error);
}
/* Function Name: InternAtoms
* Description: interns all static atoms.

View File

@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group.
#include "editresP.h"
/*
* functions.
@ -74,7 +74,7 @@ static void PopupOnNode ( WNode * node, Widget shell );
static void FreeClientData ( Widget w, XtPointer ptr, XtPointer junk );
static void FreeResBox ( Widget w, XtPointer ptr, XtPointer junk );
/* Function Name: RebuildMenusAndLabel
* Description: Determines if the user has selected an application
@ -156,7 +156,7 @@ RebuildMenusAndLabel(const char *toolkit)
}
}
/* Function Name: BuildWidgetTree
* Description: Creates all widgets for Editres.
@ -189,7 +189,7 @@ BuildWidgetTree(Widget parent)
global_tree_parent = porthole;
}
/* Function Name: CreateTopArea
@ -229,7 +229,7 @@ CreateTopArea(Widget parent)
return(panner);
}
/* Function Name: SetEntriesInsensitive
* Description: Make menu entries unusable.
@ -244,7 +244,7 @@ SetEntriesSensitive(Widget *entries, int num, Boolean sensitive)
int i; for (i=0; i<num; i++) XtSetSensitive(entries[i], sensitive);
}
/* Function Name: CreateCommandMenu
* Description: Creates the command menu.
@ -311,7 +311,7 @@ CreateCommandMenu(Widget parent, const char *toolkit)
SetEntriesSensitive(&CM_entries[CM_OFFSET], CM_NUM, False);
}
/* Function Name: CreateTreeCommandMenu
* Description: Creates the command menu.
@ -406,7 +406,7 @@ CreateTreeCommandMenu(Widget parent, const char *toolkit)
TM_NUM, False);
}
static Pixmap old_pixmap;
@ -430,7 +430,7 @@ PrepareToLayoutTree(Widget tree)
XtUnmapWidget(tree);
}
/* Function Name: LayoutTree
* Description: Laysout the tree widget.
@ -450,7 +450,7 @@ LayoutTree(Widget tree)
XtSetValues(XtParent(tree), args, ONE);
}
/************************************************************
*
@ -533,7 +533,7 @@ CreateResourceBoxWidgets(WNode *node, char **names, char **cons_names)
PopupOnNode(node, res_box->shell);
}
/* Function Name: CreateResourceNameForm
* Description: Creates the Form widget with children that represent
@ -672,7 +672,7 @@ CreateResourceNameForm(Widget parent, WNode *node)
XtFree((char *)classes);
}
/* Function Name: SetToggleGroupLeaders
* Description: Sets the leaders of each toggle group.
@ -697,7 +697,7 @@ SetToggleGroupLeaders(WNode *node)
SetResourceString(NULL, (XtPointer) node, NULL);
}
/* Function Name: MakeBoxLookNice
* Description: Resizes the box that contains the resource names
@ -807,7 +807,7 @@ MakeBoxLookNice(Widget dot, Widget star, Widget any, Widget single,
XtSetValues(single, args, num_args);
}
/* Function Name: CreateLists
* Description: Creates the list widgets for the normal and constraint
@ -911,7 +911,7 @@ CreateValueWidget(Widget parent, WNode *node)
#endif
}
/* Function Name: PopupOnNode
* Description: Pops a shell widget up centered on the node specified.
@ -969,7 +969,7 @@ PopupOnNode(WNode *node, Widget shell)
XtPopup(shell, XtGrabNone);
}
/* Function Name: FreeClientData
* Description: Frees the client data passed to this function.
@ -986,7 +986,7 @@ FreeClientData(Widget w, XtPointer ptr, XtPointer junk)
XtFree(ptr);
}
/* Function Name: FreeResBox.
* Description: Frees resource box allocated memory.

View File

@ -1,6 +1,6 @@
#
#
# Copyright 2005 Red Hat, Inc.
#
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
@ -10,7 +10,7 @@
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR

View File

@ -38,7 +38,7 @@ static void
usage(void)
{
fprintf(stderr, "Usage:\n");
fprintf(stderr,
fprintf(stderr,
"fonttosfnt [ -v ] [ -c ] [ -b ] [ -r ] [ -g n ] [ -m n ] -o font.otb "
"[ -- ] [ font ] ...\n");
}

View File

@ -106,7 +106,7 @@ readFile(char *filename, FontPtr font)
const char *family_name, *encoding_name, *file_format;
FontMapPtr mapping = NULL;
FontMapReversePtr reverse = NULL;
rc = FT_Ensure_Inited();
if(rc != 0)
@ -189,7 +189,7 @@ readFile(char *filename, FontPtr font)
if(strcmp(face->style_name, "Regular") == 0)
full_name = sprintf_alloc("%s", family_name);
else
full_name = sprintf_alloc("%s %s",
full_name = sprintf_alloc("%s %s",
family_name, face->style_name);
/* The unique name doesn't actually need to be globally
@ -198,16 +198,16 @@ readFile(char *filename, FontPtr font)
if(face->num_fixed_sizes <= 0)
unique_name = sprintf_alloc("%s "XVENDORNAMESHORT" bitmap",
full_name);
else if(face->available_sizes[0].width ==
else if(face->available_sizes[0].width ==
face->available_sizes[0].height)
unique_name = sprintf_alloc("%s "XVENDORNAMESHORT
" bitmap size %d",
full_name,
full_name,
face->available_sizes[0].height);
else
unique_name = sprintf_alloc("%s "XVENDORNAMESHORT
" bitmap size %dx%d",
full_name,
full_name,
face->available_sizes[0].width,
face->available_sizes[0].height);
@ -313,7 +313,7 @@ readFile(char *filename, FontPtr font)
for(int i = 0; i < face->num_fixed_sizes; i++) {
if(verbose_flag)
fprintf(stderr, "size %d: %dx%d\n",
i,
i,
(int)((face->available_sizes[i].x_ppem + 32) >> 6),
(int)((face->available_sizes[i].y_ppem + 32) >> 6));
@ -325,7 +325,7 @@ readFile(char *filename, FontPtr font)
return -1;
}
strike = makeStrike(font,
strike = makeStrike(font,
(face->available_sizes[i].x_ppem + 32) >> 6,
(face->available_sizes[i].y_ppem + 32) >> 6);
if(strike == NULL) {
@ -356,7 +356,7 @@ readFile(char *filename, FontPtr font)
FT_Pos_DOWN(face->glyph->metrics.horiBearingY),
face->glyph->bitmap.width,
face->glyph->bitmap.rows,
face->glyph->bitmap.pitch,
face->glyph->bitmap.pitch,
face->glyph->bitmap.buffer,
crop_flag);
@ -381,7 +381,7 @@ readFile(char *filename, FontPtr font)
found = 1;
} else {
if(i == 0) {
fprintf(stderr,
fprintf(stderr,
"Warning: no bitmap for the undefined glyph.\n");
found = 1;
}

View File

@ -127,7 +127,7 @@ makeBitmap(StrikePtr strike, int code,
int dx, dy, new_width, new_height;
bitmap = malloc(sizeof(BitmapRec));
if(bitmap == NULL)
if(bitmap == NULL)
return NULL;
*bitmap = (BitmapRec) {
@ -260,7 +260,7 @@ makeIndexSubTables(StrikePtr strike, CmapPtr cmap)
last = NULL;
/* Assuming that we're writing bit-aligned data, small metrics
and short offsets, a constant metrics segment saves 5 bytes
and short offsets, a constant metrics segment saves 5 bytes
per glyph in the EBDT table, and 2 bytes per glyph in the EBLC
table. On the other hand, the overhead for a supplementary
type 2 indexSubTable is 8 bytes for the indexSubTableArray
@ -295,9 +295,9 @@ makeIndexSubTables(StrikePtr strike, CmapPtr cmap)
BitmapPtr b3 = strikeBitmapIndex(strike, cmap, index + n + 3);
BitmapPtr b4 = strikeBitmapIndex(strike, cmap, index + n + 4);
if(b1 && b2 && b3 && b4 &&
SAME_METRICS(bitmap, b1) &&
SAME_METRICS(bitmap, b2) &&
SAME_METRICS(bitmap, b3) &&
SAME_METRICS(bitmap, b1) &&
SAME_METRICS(bitmap, b2) &&
SAME_METRICS(bitmap, b3) &&
SAME_METRICS(bitmap, b4)) {
break;
}
@ -363,7 +363,7 @@ makeCmap(FontPtr font)
continue;
}
i = 1;
while(code + i < FONT_CODES &&
while(code + i < FONT_CODES &&
fontIndex(font, code + i) == index + i) {
i++;
}
@ -456,16 +456,16 @@ glyphMetrics(FontPtr font, int code,
BitmapPtr bitmap = STRIKE_BITMAP(strike, code);
if(bitmap) {
if(width_return)
*width_return =
*width_return =
(((float)bitmap->advanceWidth) / strike->sizeX) *
TWO_SIXTEENTH;
if(x_min_return)
*x_min_return =
((float)bitmap->horiBearingX / strike->sizeX) *
((float)bitmap->horiBearingX / strike->sizeX) *
TWO_SIXTEENTH;
if(y_min_return)
*y_min_return =
(((float)bitmap->horiBearingY - bitmap->height)
(((float)bitmap->horiBearingY - bitmap->height)
/ strike->sizeY) * TWO_SIXTEENTH;
if(x_max_return)
*x_max_return =

View File

@ -67,7 +67,7 @@ static int write_error_occurred, read_error_occurred;
/* floor(log2(x)) */
static int
log2_floor(int x)
log2_floor(int x)
{
int i, j;
@ -88,7 +88,7 @@ static int
two_log2_floor(int x)
{
int j;
if(x <= 0)
abort();
@ -312,7 +312,7 @@ fontMetrics(FontPtr font)
* font->metrics.size / font->pxMetrics.size;
}
int
int
writeFile(char *filename, FontPtr font)
{
int rc;
@ -380,11 +380,11 @@ writeFile(char *filename, FontPtr font)
tables[i] = makeName("head"); table_writers[i] = writehead; i++;
tables[i] = makeName("hhea"); table_writers[i] = writehhea; i++;
if(nummetrics >= 1) {
tables[i] = makeName("hmtx");
tables[i] = makeName("hmtx");
table_writers[i] = writehmtx; i++;
}
if(numglyphs >= 1) {
tables[i] = makeName("loca");
tables[i] = makeName("loca");
table_writers[i] = writeloca; i++;
}
tables[i] = makeName("maxp"); table_writers[i] = writemaxp; i++;
@ -533,8 +533,8 @@ fixupChecksum(FILE *out, int full_length, int head_position)
return 0;
}
static int
static int
writehead(FILE* out, FontPtr font)
{
int time_hi = 0;
@ -603,7 +603,7 @@ outputRaster(FILE *out, char *raster, int width, int height, int stride,
return len;
}
static int
static int
writeEBDT(FILE* out, FontPtr font)
{
StrikePtr strike;
@ -634,8 +634,8 @@ writeEBDT(FILE* out, FontPtr font)
writeBYTE(out, bitmap->advanceWidth);
offset += 5;
}
offset += outputRaster(out,
bitmap->raster,
offset += outputRaster(out,
bitmap->raster,
bitmap->width, bitmap->height,
bitmap->stride,
bit_aligned_flag);
@ -650,7 +650,7 @@ writeEBDT(FILE* out, FontPtr font)
return 0;
}
static int
static int
writeEBLC(FILE* out, FontPtr font)
{
int numstrikes, eblc_start, num, den;
@ -666,7 +666,7 @@ writeEBLC(FILE* out, FontPtr font)
}
eblc_start = ftell(out);
writeULONG(out, 0x00020000); /* version */
writeULONG(out, numstrikes); /* numSizes */
@ -724,7 +724,7 @@ writeEBLC(FILE* out, FontPtr font)
perror("Couldn't seek");
return -1;
}
writeULONG(out, strike->indexSubTableLocation - eblc_start);
writeULONG(out, strike->indexSubTableLocation - eblc_start);
/* indexSubTableArrayOffset */
writeULONG(out, endoffset - strike->indexSubTableLocation);
/* indexTablesSize */
@ -793,12 +793,12 @@ writeEBLC(FILE* out, FontPtr font)
writeULONG(out, data_location);
if(table->constantMetrics) {
int size;
BitmapPtr bitmap =
strikeBitmapIndex(strike, current_cmap,
BitmapPtr bitmap =
strikeBitmapIndex(strike, current_cmap,
table->firstGlyphIndex);
size =
strikeBitmapIndex(strike, current_cmap,
size =
strikeBitmapIndex(strike, current_cmap,
table->firstGlyphIndex + 1)->location -
bitmap->location;
writeULONG(out, size); /* imageSize */
@ -814,7 +814,7 @@ writeEBLC(FILE* out, FontPtr font)
} else {
for(int i = table->firstGlyphIndex;
i <= table->lastGlyphIndex; i++) {
int offset =
int offset =
strikeBitmapIndex(strike, current_cmap, i)->location -
data_location;
if(short_offsets)
@ -843,7 +843,7 @@ writeEBLC(FILE* out, FontPtr font)
return 0;
}
static int
static int
writecmap(FILE* out, FontPtr font)
{
int rc, cmap_start, cmap_end;
@ -876,7 +876,7 @@ writecmap(FILE* out, FontPtr font)
writeUSHORT(out, segcount * 2); /* segCountX2 */
writeUSHORT(out, 2 * two_log2_floor(segcount)); /* searchRange */
writeUSHORT(out, 1 + log2_floor(segcount)); /* entrySelector */
writeUSHORT(out, 2 * (segcount - two_log2_floor(segcount)));
writeUSHORT(out, 2 * (segcount - two_log2_floor(segcount)));
/* rangeShift */
cmap = current_cmap;
@ -928,7 +928,7 @@ writecmap(FILE* out, FontPtr font)
return 0;
}
static int
static int
writeglyf(FILE* out, FontPtr font)
{
return 0;
@ -962,7 +962,7 @@ writehhea(FILE* out, FontPtr font)
return 0;
}
static int
static int
writehmtx(FILE* out, FontPtr font)
{
for(int i = 0; i <= numglyphs; i++) {
@ -986,7 +986,7 @@ writehmtx(FILE* out, FontPtr font)
return 0;
}
static int
static int
writeloca(FILE* out, FontPtr font)
{
/* All glyphs undefined -- loca table is empty, so offset 0 */
@ -997,7 +997,7 @@ writeloca(FILE* out, FontPtr font)
return 0;
}
static int
static int
writemaxp(FILE* out, FontPtr font)
{
writeLONG(out, 0x00010000); /* version */
@ -1018,7 +1018,7 @@ writemaxp(FILE* out, FontPtr font)
return 0;
}
static int
static int
writename(FILE* out, FontPtr font)
{
int offset;
@ -1041,7 +1041,7 @@ writename(FILE* out, FontPtr font)
return 0;
}
static int
static int
writepost(FILE* out, FontPtr font)
{
int previous_width, fixed_pitch;
@ -1061,7 +1061,7 @@ writepost(FILE* out, FontPtr font)
}
previous_width = width;
}
writeULONG(out, 0x00030000); /* FormatType */
writeULONG(out, font->italicAngle); /* italicAngle */
writeSHORT(out, FONT_UNITS(font->metrics.underlinePosition));
@ -1074,7 +1074,7 @@ writepost(FILE* out, FontPtr font)
return 0;
}
static int
static int
writeOS2(FILE* out, FontPtr font)
{
int i;
@ -1138,12 +1138,12 @@ writeOS2(FILE* out, FontPtr font)
return 0;
}
static int
static int
writePCLT(FILE* out, FontPtr font)
{
char name[16] = "X11 font ";
char filename[6] = "X11R00";
unsigned char charComplement[8] =
unsigned char charComplement[8] =
{0xFF, 0xFF, 0xFF, 0xFF, 0x0B, 0xFF, 0xFF, 0xFE};
int style, w, strokeWeight, widthType;