nanogui: Thread: fonts


[<<] [<] Page 1 of 3 [>] [>>]
Subject: fonts
From: "Amit Kulkarni" ####@####.####
Date: 3 Mar 2001 10:48:33 -0000
Message-Id: <F151mECo39lMXUukLhh00003e07@hotmail.com>

hi,

how can i have GrCreateFont return a "copy" of the built in font?
The built in font seems to be rather thick and i want the default fonts to 
look thin. GrSetFontSize for the default font does not seem to work.
But if i say something weird like GrCreateFont("",8,NULL) it seems to work 
and somehow get a nice thinner font..(besides a warning printed by the 
nano-X server)
Also i do not want to load a freetype font for this purpose. The free type 
support although present is of little practical use since it really crawls. 
The built in fonts are much faster and better.

--
Regards,
Amit Kulkarni
Visit me at http://www.amitkulkarni.com

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Subject: Re: fonts
From: "Greg Haerr" ####@####.####
Date: 3 Mar 2001 19:47:42 -0000
Message-Id: <08c601c0a419$d3418cc0$15320cd0@gregh>

: how can i have GrCreateFont return a "copy" of the built in font?

Use GrCreateFont, details below.  GrCreateFont will use count
increment one of the built-in or external fonts, and then
GrSetGCFont can be used to associate the font with a gc.


: The built in font seems to be rather thick and i want the default fonts to 
: look thin. GrSetFontSize for the default font does not seem to work.
: But if i say something weird like GrCreateFont("",8,NULL) it seems to work 
: and somehow get a nice thinner font..(besides a warning printed by the 
: nano-X server)

If you look in include/mwtypes.h, you'll see the standard 4 fonts
that are built in to Microwindows.  You will want to execute
    GrCreateFont(MWFONT_GUI_VAR, 0, NULL);
which indicates a thin, Helvetica-style 11x13 ANSI font.
The default is MWFONT_SYSTEM_VAR, which is too thick.
I've been thinking for some time that the default font probably
should be changed to MWFONT_GUI_VAR.


: Also i do not want to load a freetype font for this purpose. The free type 
: support although present is of little practical use since it really crawls. 
: The built in fonts are much faster and better.

I'm working on some big speed improvements to freetype rendering
speed.  Someone had completed this at Century but their system
crashed and he had no backup ;-!

Regards,

Greg


Subject: Fonts
From: "Leah Burstein" ####@####.####
Date: 13 Jun 2001 18:08:54 -0000
Message-Id: <004401c0f434$89423c30$7001010a@homeGopher.com>

Hi, 

I have problem in changing both font size and font name. For size, I can get only two different sizes. For name, I have installed True Type fonts according to these instructions:

*****************************************************************
1) Get, build and install the FreeType library version 1.3.1. You can get version 1.3.1 from the Microwindows FTP site: ftp://microwindows.censoft.com/pub/microwindows/

2) Modify the Microwindows config file in ".../microwin/src/" directory.
Change "HAVE_FREETYPE_SUPPORT" to "Y". Modify "INCFTLIB" and "LIBFTLIB" to
point to the directories that contain the FreeType libraries. On my system
it was "INCFTLIB = /usr/local/include" and "LIBFTLIB =
/usr/local/lib/libttf.so". Re-build and re-install Microwindows.

3) Create a directory "/usr/local/microwin/fonts/" on your target machine
to hold TrueType fonts. You can get some free truetype fonts from this
site: http://www.microsoft.com/typography/fontpack/default.htm

4) Load the fonts at runtime with the following commands (for nano-X):
font = GrCreateFont ((GR_CHAR*) "arial", 8, NULL);
font = GrCreateFont ((GR_CHAR*) "comic", 12, NULL);
font = GrCreateFont ((GR_CHAR*) "comic", 24, NULL);
*******************************************************************************
In my case, the directory in step 3 is "/usr/local/srs/microwin/src/fonts". The rest is the same.
But still - in Hello Demo the following two things look the same way:

fontid=GrCreateFont((GR_CHAR*)"times",8,NULL);
    GrSetGCFont(gc, fontid);
    GrText (wid,gc,20,40,"Hello World", -1, GR_TFASCII);

 fontid=GrCreateFont((GR_CHAR*)"arial",11,NULL);
    GrSetGCFont(gc, fontid);
    GrText (wid,gc,20,60,"Hello World", -1, GR_TFASCII);

Am I missing something?

Thank you,
Leah.

Subject: Re: [nanogui] Fonts
From: "Leah Burstein" ####@####.####
Date: 14 Jun 2001 00:26:36 -0000
Message-Id: <00cf01c0f469$3f608f10$7001010a@homeGopher.com>

Thanks to Gary for the help,
it appears that it worked, but I was using the old nano-X version... Sorry.

Leah
----- Original Message -----
From: Leah Burstein ####@####.####
To: NanoGui ####@####.####
Sent: Wednesday, June 13, 2001 11:13 AM
Subject: [nanogui] Fonts


Hi,

I have problem in changing both font size and font name. For size, I can get
only two different sizes. For name, I have installed True Type fonts
according to these instructions:

*****************************************************************
1) Get, build and install the FreeType library version 1.3.1. You can get
version 1.3.1 from the Microwindows FTP site:
ftp://microwindows.censoft.com/pub/microwindows/

2) Modify the Microwindows config file in ".../microwin/src/" directory.
Change "HAVE_FREETYPE_SUPPORT" to "Y". Modify "INCFTLIB" and "LIBFTLIB" to
point to the directories that contain the FreeType libraries. On my system
it was "INCFTLIB = /usr/local/include" and "LIBFTLIB =
/usr/local/lib/libttf.so". Re-build and re-install Microwindows.

3) Create a directory "/usr/local/microwin/fonts/" on your target machine
to hold TrueType fonts. You can get some free truetype fonts from this
site: http://www.microsoft.com/typography/fontpack/default.htm

4) Load the fonts at runtime with the following commands (for nano-X):
font = GrCreateFont ((GR_CHAR*) "arial", 8, NULL);
font = GrCreateFont ((GR_CHAR*) "comic", 12, NULL);
font = GrCreateFont ((GR_CHAR*) "comic", 24, NULL);
****************************************************************************
***
In my case, the directory in step 3 is "/usr/local/srs/microwin/src/fonts".
The rest is the same.
But still - in Hello Demo the following two things look the same way:

fontid=GrCreateFont((GR_CHAR*)"times",8,NULL);
    GrSetGCFont(gc, fontid);
    GrText (wid,gc,20,40,"Hello World", -1, GR_TFASCII);

 fontid=GrCreateFont((GR_CHAR*)"arial",11,NULL);
    GrSetGCFont(gc, fontid);
    GrText (wid,gc,20,60,"Hello World", -1, GR_TFASCII);

Am I missing something?

Thank you,
Leah.



Subject: fonts
From: Fergal Kelly ####@####.####
Date: 3 May 2002 10:39:43 -0000
Message-Id: <000301c1f28d$abb23ce0$953c78c1@heysen.leop.s3group.com>

Hi

I'm want to use extra fonts but don't want to include all the fonts from
freetype.  I just need a larger size font that what's available.

Is there a straight forward means of doing this??

Thanks,

Fergal

Subject: Re: [nanogui] fonts
From: ####@####.####
Date: 3 May 2002 12:28:55 -0000
Message-Id: <OF76F554CB.ADC8B8EF-ON80256BAE.00436C1D@diamond.philips.com>

Hi,

> I'm want to use extra fonts but don't want to include all
> the fonts from freetype.  I just need a larger size font
> that what's available.
>
> Is there a straight forward means of doing this??

You can display Truetype fonts using Freetype 1.x - this lets you have arbitrary sizes.  (Note that you do need Freetype 1.x, since version 2.0 is not backward-compatible).

Kind regards,

Jon

Subject: Re: [nanogui] fonts
From: "Greg Haerr" ####@####.####
Date: 9 May 2002 05:20:35 -0000
Message-Id: <028801c1f717$31e0a940$3aba46a6@xmission.com>

: I'm want to use extra fonts but don't want to include all the fonts from
: freetype.  I just need a larger size font that what's available.
: 
: Is there a straight forward means of doing this??

If you can find a larger version of the font you desire, convert
it into BDF format, and then use Microwindows' convbdf
program to link the font into Microwindows.  This does
not require FreeType.

Regards,

Greg

Subject: fonts
From: Zhao Jianwei ####@####.####
Date: 7 Apr 2003 00:59:43 -0000
Message-Id: <PAEEKBCMHPJHFFKDDOAOOEBDCBAA.zhaojianwei@neusoft.com>

hi everyone,
    i cannot download microwindows-fonts-0.89.tar.gz from ftp://microwindows.org/pub/microwindows/,
why? and is it valid ? where can i get it ? 
Subject: Fonts
From: "Curtis Nelson" ####@####.####
Date: 8 Jul 2004 22:04:42 +0100
Message-Id: <s0ed6283.045@larsondavis.com>

Hi,

Can anyone please provide some sample code showing how to display some Chinese/Japanese/Korean text on a button or in a listbox using the Win32 interface?

I'm having a pretty tough time figuring this stuff out, so any help would be greatly appreciated.

Thank you

Subject: Re: [nanogui] Fonts
From: "Greg Haerr" ####@####.####
Date: 13 Jul 2004 03:27:58 +0100
Message-Id: <009401c46880$eac68d80$3aba46a6@xmission.com>

> Can anyone please provide some sample code showing how to display some
> Chinese/Japanese/Korean text on a button or in a listbox using the Win32 interface?

The win32 support for the new DBCS and UC16 fonts is not as easy
as the nano-X API, since we had to stay compatible with existing win32
API.  If you check out the ExtTextOut implementation in src/mwin,
you'll see that the MWTF_xxx flags value in the GdText call needs
to change to match the encoding of the font you're using.  The
font is selected in the standard win32 fashion using CreateFont,
and specifying the full path to the .ttf file.

Regards,

Greg

[<<] [<] Page 1 of 3 [>] [>>]


Powered by ezmlm-browse 0.20.