AnyEvent-MSN
view release on metacpan or search on metacpan
lib/AnyEvent/MSN.pm view on Meta::CPAN
=back
=head1 Notes
Get by with a little help...
=head2 Text Format
Messages sent and recieved may contain a special parameter defining how the
message should be displayed. The message format specifies the font (FN),
effect (EF), color (CO), character set (CS) and pitch and family (PF) used for
rendering the text message. The value of the Format element is a string of the
following key/value pairs:
=for url http://msdn.microsoft.com/en-us/library/bb969558(v=office.12).aspx
=over
=item FN
Specifies a font name. The font name must be URL-encoded. For example, to have
a font of "MS Sans Serif", you would have to specify C<FN=MS%20Sans%20Serif>.
Font names are not case-sensitive and only spaces should be URL-encoded.
URL-encoding other characters such as numbers and letters cause unpredictable
results in other clients.
According to MS, if the receiving client does not have the specified font, it
should make judgment based on the PF and CS parameters. Basically, the client
should select whichever available font supports the character set specified in
CS and is closest to the category specified in PF. If those parameters are not
present, the client should just use a default font.
=item EF
Specifies optional style effects. Possible effects are bold, italic,
underline, and strikethrough. Each effect is referred to by its first letter.
For example, to make bold-italic text, include the parameter C<EF=IB> or
C<EF=BI>. The order does not matter. Any unknown effects are to be ignored.
If there are no effects, just leave the parameter value blank.
=item CO
Specifies a font color. The value of the CO field is a six-character
hex BGR (Note that this is I<blue-green-red>, the I<reverse> of the standard
RGB order seen in HTML) string. The first two characters represent a hex
number from C<00> to C<ff> for the intensity of blue, the second two are for
green, and the third two are for red. For example, to make a full red color,
send C<CO=0000ff>.
Again, this should be in BGR; the I<reverse> of the standard RGB order seen in
HTML.
=item CS
Character sets are identified in the CS parameter with one or two hexadecimal
digits (leading zeros are dropped by the official client and are ignored if
present), representing the numerical value Windows uses for the character set.
The following table shows the full list of the predefined character sets that
are included with the Microsoft® Windows® operating system.
Val Description
-------------------------------------------------------------------------
00 ANSI characters
01 Font is chosen based solely on name and size. If the described font is
not available on the system, you should substitute another font.
02 Standard symbol set
4d Macintosh characters
80 Japanese shift-JIS characters
81 Korean characters (Wansung)
82 Korean characters (Johab)
86 Simplified Chinese characters (China)
88 Traditional Chinese characters (Taiwan)
a1 Greek characters
a2 Turkish characters
a3 Vietnamese characters
lib/AnyEvent/MSN.pm view on Meta::CPAN
ee Sometimes called the "Central European" character set, this includes
diacritical marks for Eastern European countries
ff Depends on the codepage of the operating system
You should not assume that clients receiving your messages understand all
character sets. This character set is arbitrary, but it is advisable to make
it the one that causes the most characters to be displayed correctly.
=item PF
The PF family defines the category that the font specified in the FN parameter
falls into. This parameter is used by the receiving client if it does not have
the specified font installed. The value is a two-digit hexadecimal number.
If you're familiar with the Windows APIs, this value is the PitchAndFamily
value in RichEdit and LOGFONT.
The first digit of the value represents the font family. Below is a list of
numbers for the first digit and the font families they represent.
First Digit Description
-------------------------------------------------------------------------
0_ Specifies a generic family name. This name is used when
information about a font does not exist or does not
matter. The default font is used.
1_ Specifies a proportional (variable-width) font with
serifs. An example is Times New Roman.
2_ Specifies a proportional (variable-width) font without
serifs. An example is Arial.
3_ Specifies a Monospace font with or without serifs.
Monospace fonts are usually modern; examples include Pica,
Elite, and Courier New.
4_ Specifies a font that is designed to look like
handwriting; examples include Script and Cursive.
5_ Specifies a novelty font. An example is Old English.
The second digit represents the pitch of the font â in other words, whether it
is monospace or variable-width.
Second Digit Description
-------------------------------------------------------------------------
_0 Specifies a generic font pitch. This name is used when
information about a font does not exist or does not
matter. The default font pitch is used.
_1 Specifies a fixed-width (Monospace) font. Examples are
Courier New and Bitstream Vera Sans Mono.
_2 Specifies a variable-width (proportional) font. Examples
are Times New Roman and Arial.
Below are some PF values and example fonts that fit the category.
Examples of PF Value Description
-------------------------------------------------------------------------
12 Times New Roman, MS Serif, Bitstream Vera Serif
22 Arial, Verdana, MS Sans Serif, Bitstream Vera Sans
31 Courier New, Courier
42 Comic Sans MS
=head1 TODO
( run in 0.910 second using v1.01-cache-2.11-cpan-5735350b133 )