Fonts: - fonts/hack: Hack 3.003 (Expat + Bitstream Vera, from Debian fonts-hack), installed to dt/fonts; config/fonts.conf (the system's fontconfig plus that directory) exported by Xsession.d/0070.dtfonts and Dtlogin*environment. - sys.resources and dtlogin Xresources: Xft render tables in Hack 10 for renderTable, textRenderTable, labelRenderTable, buttonRenderTable (a render table wins over sys.font's *FontList; dtterm and text fields read the text table). dtterm (ported from MakroDE -- setlocale and the Xft renderer -- then fixed): - configure: Xft on by default, --disable-xft for machines without it. - TermPrimRenderXft.c: reads wchar_t in multibyte locales (it read the buffer as UTF-8 bytes: three boxes after every character), places every character in its cell on the baseline, fills the background, draws underline/overstrike/secure, wcwidth for wide and combining characters, borrows glyphs from fontconfig fallbacks (check mark, CJK), and makes its XftDraw at the first drawing (made in Initialize it was window 0, and the first string a BadDrawable that ended dtterm). - TermPrim.c AdjustWindowUnits: the cell from the renderer's extents when there is no XFontStruct (crashed with Xft); _DtTermPrimRenderFontExtents. - TermPrimRenderFont.c: with setlocale the buffer is wchar_t in UTF-8, the single-font renderer draws it as XChar2b (it drew boxes too). Screenshots: build/mcde-shots/dtterm-utf8b-crop.png, dtterm-classic-crop.png. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
2.5 KiB
C
72 lines
2.5 KiB
C
/*
|
|
* CDE - Common Desktop Environment
|
|
*
|
|
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
|
*
|
|
* These libraries and programs are free software; you can
|
|
* redistribute them and/or modify them under the terms of the GNU
|
|
* Lesser General Public License as published by the Free Software
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* These libraries and programs are distributed in the hope that
|
|
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
|
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
* PURPOSE. See the GNU Lesser General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with these libraries and programs; if not, write
|
|
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
|
* Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
/*
|
|
* $XConsortium: TermPrimI.h /main/1 1996/04/21 19:17:45 drk $";
|
|
*/
|
|
/* *
|
|
* (c) Copyright 1993, 1994 Hewlett-Packard Company *
|
|
* (c) Copyright 1993, 1994 International Business Machines Corp. *
|
|
* (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
|
|
* (c) Copyright 1993, 1994 Novell, Inc. *
|
|
*/
|
|
#ifndef _Dt_TermPrimI_h
|
|
#define _Dt_TermPrimI_h
|
|
|
|
#include <Xm/Xm.h>
|
|
#include <TermPrim.h>
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
extern void _DtTermPrimForcePtyRead(XtPointer client_data, XtIntervalId *id);
|
|
extern void _DtTermPrimLoopBackData(Widget w, char *data, int dataLength);
|
|
extern void _DtTermPrimDrawShadow(Widget w);
|
|
extern void _DtTermPrimStartOrStopPtyInput(Widget w);
|
|
extern void _DtTermPrimStartOrStopPtyOutput(Widget w);
|
|
extern void _DtTermPrimSendInput(Widget w, unsigned char *buffer, int len);
|
|
extern void _DtTermPrimInsertCharUpdate(Widget w, DtTermInsertCharMode insertCharMode);
|
|
extern void _DtTermPrimWarningDialog(Widget w, char *msg);
|
|
extern void _DtTermPrimPutEnv(char *c1, char *c2);
|
|
extern void
|
|
_DtTermPrimInvokeStatusChangeCallback
|
|
(
|
|
Widget w
|
|
);
|
|
|
|
extern void
|
|
_DtTermPrimGetFontSet
|
|
(
|
|
Widget w,
|
|
XmFontList fontList,
|
|
XFontSet *fontSet,
|
|
XFontStruct **font,
|
|
void **xftFont /* MakroDE (13b): an XftFont* when HAVE_XFT, opaque here */
|
|
);
|
|
|
|
#ifdef __cplusplus
|
|
} /* close scope of 'extern "C"'... */
|
|
#endif /* __cplusplus */
|
|
|
|
/* DON'T ADD ANYTHING AFTER THIS #endif... */
|
|
#endif /* _Dt_TermPrimI_h */
|