Board index » delphi » Font Different in richedit

Font Different in richedit

In article <V1Ix6BAaNGX2E...@fireflies.demon.co.uk>, Stuart Jeffrey

Quote
<s...@iname.com> writes:
>Hi i have a richedit component and when i load different fon't into it
>they appear totaly different to if they were loaded in MS word or Char
>Map but i don't understand why.

>For example MS LineDraw char alt 0186 is different.

>Why is this and can it be put right.  Thanks
>--
>Stuart Jeffrey

>E-mail s...@fireflies.demon.co.uk

>WWW:  http://www.fireflies.demon.co.uk/sej1/

Try putting a button on the form to see if it's anything to do with the
charset.

ie

procedure TForm1.Button1Click(Sender: TObject);
begin
RichEdit1.Font.Charset:= RichEdit1.Font.Charset + 1;
end;

hth

Gordon

http://members.aol.com/gwhit41980/

 

Re:Font Different in richedit


Hi i have a richedit component and when i load different fon't into it
they appear totaly different to if they were loaded in MS word or Char
Map but i don't understand why.

For example MS LineDraw char alt 0186 is different.

Why is this and can it be put right.  Thanks
--
Stuart Jeffrey

E-mail s...@fireflies.demon.co.uk

WWW:  http://www.fireflies.demon.co.uk/sej1/

Re:Font Different in richedit


In article <19981125152307.25164.00001...@ngol07.aol.com>, GWhit41980
<gwhit41...@aol.com> writes
Quote
>Try putting a button on the form to see if it's anything to do with the
>charset.

>ie

>procedure TForm1.Button1Click(Sender: TObject);
>begin
>RichEdit1.Font.Charset:= RichEdit1.Font.Charset + 1;
>end;

charset is an unknow identifier.  Is this because i am using delphi2.

I have looked charset up in help and it says

typedef struct tagCHARSET { // chst

    DWORD aflBlock[3];
    DWORD flLang;

Quote
} CHARSET;

The CHARSET structure specifies the Unicode blocks and the character
sets supported by a given font.

Members

aflBlock

Specifies which (if any) of the 96 Unicode blocks are supported by a
font. If the font contains at least one character in the given block,
the corresponding bit is set.

flLang

Identifies the character set supported by the font. This member can be
one of the following values:

Value   Meaning
CS_UGL  Supports the Universal Glyph List (UGL) character set.
CS_LATIN        Supports the Latin character set.
CS_GREEK        Supports the Greek character set.
CS_WIN30        Supports the Windows 3.0 character set.
Bits 0 and 31 of flLang are reserved and must be set to zero.

This is on white pages.  Just out of interest what is the different
between white and yellow pages in help other then the yellow generally
seem easier to understand.

What shall i do now.

Thanks
--
Stuart Jeffrey

E-mail s...@fireflies.demon.co.uk

WWW:  http://www.fireflies.demon.co.uk/sej1/

Re:Font Different in richedit


In article <a61GTGATMZX2E...@fireflies.demon.co.uk>, Stuart Jeffrey

Quote
<s...@iname.com> writes:
>charset is an unknow identifier.  Is this because i am using delphi2.

>I have looked charset up in help and it says

[snip]

It might be I haven't used D2. If you open the object inspector and double
click the 'font' section, is charset in the list?

If it is hidden it may still be in RichEdit.Pas, try putting RichEdit in your
uses clause. In D3 they can be referenced by 'name' or 'number'. These are some
of the more common values. Try at least the first three.

Incidentally, I tried the Lotus Line Draw font with D3 without any problems.

ANSI_CHARSET               =  0;
DEFAULT_CHARSET        = 1;
SYMBOL_CHARSET          = 2;
MAC_CHARSET                = 77;
SHIFTJIS_CHARSET         = 128;
HANGEUL_CHARSET        = 129;
JOHAB_CHARSET            = 130;
GB2312_CHARSET           = 134;
CHINESEBIG5_CHARSET = 136;
GREEK_CHARSET            = 161;
TURKISH_CHARSET          = 162;
VIETNAMESE_CHARSET   = 163;
HEBREW_CHARSET          = 177;
ARABIC_CHARSET           = 178;
BALTIC_CHARSET            = 186;
RUSSIAN_CHARSET          = 204;
THAI_CHARSET                 = 222;
EASTEUROPE_CHARSET   = 238;
OEM_CHARSET                 = 255;

Gordon.

http://members.aol.com/gwhit41980/

Re:Font Different in richedit


Quote
Stuart Jeffrey wrote in message ...
>>procedure TForm1.Button1Click(Sender: TObject);
>>begin
>>RichEdit1.Font.Charset:= RichEdit1.Font.Charset + 1;
>>end;
>charset is an unknow identifier.  Is this because i am using delphi2.

>I have looked charset up in help and it says

>typedef struct tagCHARSET { // chst

>    DWORD aflBlock[3];
>    DWORD flLang;
>} CHARSET;

You've found the wrong charset. The "charset" property of
Delphi objects is something that wasn't introduced until
Delphi 3.

Quote
>This is on white pages.  Just out of interest what is the different
>between white and yellow pages in help other then the yellow generally
>seem easier to understand.

*Chuckle*. These are two totally different help files. The "white
pages" you refer to are from the Windows API Help, supplied
by Microsoft. This help file documents all of the Windows API
functions - all of the function descriptions and their parameters
are given in C code. You won't find anything to do with Delphi
in this help file.

Since there is no Delphi "charset" property in your version,
Delphi found the next best thing, in the API help.

The "Yellow Pages" are the Delphi help system. It lists all of
the Delphi functions, and all Delphi classes with their properties
and methods, plus some stuff about the IDE and compiler and
some general examples and guidelines.

If you don't know any C, you have two options - either stick
entirely to the Delphi stuff (you can do a *lot* - most of the API
is wrapped in a Delphi function somewhere), or learn enough
C to read the function declarations and data types that
comprise the majority of the API help.

--
Jeremy Collins

Re:Font Different in richedit


In article <19981126141225.27795.00001...@ngol06.aol.com>, GWhit41980
<gwhit41...@aol.com> writes
Quote
>It might be I haven't used D2. If you open the object inspector and double
>click the 'font' section, is charset in the list?

>If it is hidden it may still be in RichEdit.Pas, try putting RichEdit in your
>uses clause. In D3 they can be referenced by 'name' or 'number'. These are some
>of the more common values. Try at least the first three.

>Incidentally, I tried the Lotus Line Draw font with D3 without any problems.

Also someone else said

Quote
>You've found the wrong charset. The "charset" property of
>Delphi objects is something that wasn't introduced until
>Delphi 3.

Is it possible to add them as a components by getting the regedit.pas
file of someone else.

and if so can someone please send it to me.

Thanks.

--
Stuart Jeffrey

E-mail s...@fireflies.demon.co.uk

WWW:  http://www.fireflies.demon.co.uk/sej1/

Other Threads