rem: tPtr->dFont = WMRetainFont(WMSystemFontOfSize(tPtr->view->screen, 12));
add: tPtr->dFont = WMRetainFont(WMSystemFontOfSize(scr, 12));
context: WMCreateTextForDocumentType(WMWidget *parent, WMAction *parser, WMAction *writer){    Text *tPtr;    tPtr = wmalloc(sizeof(Text));    memset(tPtr, 0, sizeof(Text));    tPtr->widgetClass = WC_Text;    tPtr->view = W_CreateView(W_VIEW(parent));    if (!tPtr->view) {        perror("could not create text's view\n");        wfree(tPtr);        return NULL;    }    tPtr->view->self = tPtr;    tPtr->view->attribs.cursor = tPtr->view->screen->textCursor;    tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;    W_ResizeView(tPtr->view, 250, 200);    tPtr->dColor = WMWhiteColor(tPtr->view->screen);    tPtr->bgGC = WMColorGC(tPtr->dColor);    W_SetViewBackgroundColor(tPtr->view, tPtr->dColor);    WMReleaseColor(tPtr->dColor);    tPtr->dColor = WMBlackColor(tPtr->view->screen);    tPtr->fgGC = WMColorGC(tPtr->dColor);    tPtr->ruler = NULL;    tPtr->vS = NULL;    tPtr->hS = NULL;    tPtr->dFont = WMRetainFont(WMSystemFontOfSize(tPtr->view->screen, 12));    tPtr->view->delegate = &_TextViewDelegate;    tPtr->delegate = NULL;#if DO_BLINK    tPtr->timerID = NULL;#endif    WMCreateEventHandler(tPtr->view, ExposureMask|StructureNotifyMask        |EnterWindowMask|LeaveWindowMask|FocusChangeMask,         handleEvents, tPtr);    WMCreateEventHandler(tPtr->view, ButtonReleaseMask|ButtonPressMask        |KeyReleaseMask|KeyPressMask|Button1MotionMask,         handleActionEvents, tPtr);        WMAddNotificationObserver(ownershipObserver, tPtr,         "_lostOwnership", tPtr);        WMSetViewDragSourceProcs(tPtr->view, &_DragSourceProcs);    WMSetViewDragDestinationProcs(tPtr->view, &_DragDestinationProcs);    {        char *types[3] = {"application/X-color", "application/X-image", NULL};        WMRegisterViewForDraggedTypes(tPtr->view, types);    }    WMAddNotificationObserver(fontChanged, tPtr,         "WMFontPanelDidChangeNotification", tPtr);    tPtr->firstTextBlock = NULL;    tPtr->lastTextBlock = NULL;    tPtr->currentTextBlock = NULL;    tPtr->tpos = 0;    tPtr->gfxItems = WMCreateArray(4);    tPtr->parser = parser;    tPtr->writer = writer;    tPtr->sel.x = tPtr->sel.y = 2;    tPtr->sel.w = tPtr->sel.h = 0;    tPtr->clicked.x = tPtr->clicked.y = 2;    tPtr->visible.x = tPtr->visible.y = 2;    tPtr->visible.h = tPtr->view->size.height;    tPtr->visible.w = tPtr->view->size.width - 4;        tPtr->cursor.x = -23;    tPtr->docWidth = 0;    tPtr->docHeight = 0;    tPtr->dBulletPix = WMCreatePixmapFromXPMData(tPtr->view->screen,        default_bullet);    tPtr->db = (Pixmap) NULL;    tPtr->bgPixmap = NULL;    tPtr->margins = WMGetRulerMargins(NULL);    tPtr->margins->right = tPtr->visible.w;    tPtr->nMargins = 1;    tPtr->flags.rulerShown = False;    tPtr->flags.monoFont = False;        tPtr->flags.focused = False;    tPtr->flags.editable  = True;    tPtr->flags.ownsSelection  = False;    tPtr->flags.pointerGrabbed  = False;    tPtr->flags.extendSelection = False;    tPtr->flags.frozen  = False;    tPtr->flags.cursorShown = True;    tPtr->flags.acceptsGraphic = False;    tPtr->flags.horizOnDemand = False;    tPtr->flags.needsLayOut = False;    tPtr->flags.ignoreNewLine = False;    tPtr->flags.indentNewLine = False;    tPtr->flags.laidOut = False;    tPtr->flags.ownsSelection = False;    tPtr->flags.waitingForSelection = False;    tPtr->flags.prepend = False;    tPtr->flags.isOverGraphic = False;    tPtr->flags.relief = WRSunken;    tPtr->flags.isOverGraphic = 0;    tPtr->flags.alignment = WALeft;    tPtr->flags.first = True;    return tPtr;}