Re: [Fonts] convert font

2005-12-02 Thread Sergey Babkin
>From: Salvatore Celsomino <[EMAIL PROTECTED]>

>there is a system in order to convert a font .bdf or .pcf into font .fon or 
>.ttf. i have tried bdftofon.exe and pcftofon.exe, but for the my font,they 
>have errors: too many characters. thanks

ttf2pt1 (http://ttf2pt1.sf.net) can convert .bdf to 
Type1 (.pfa or .pfb). Conversion to the smooth curves
is a bit experimental and incomplete yet, but the 
direct by-pixel conversion works fine.

There is also some interactive editor, I forgot the 
name, pfaedit or something, that can convert to TTF.

-SB
___
Fonts mailing list
Fonts@XFree86.Org
http://XFree86.Org/mailman/listinfo/fonts


Re: [Fonts] help: about how to convert BDF fonts to TTF fonts

2003-12-18 Thread Sergey Babkin
zhang hui wrote:
> 
> Hi, everyone
> 
> does anyone know any tools which can convert BDF to TTF in linux OS? the
> tool is important to my current project,so if anyone got the tool,would you
> please tell me where to download it?
> please reply me to [EMAIL PROTECTED] as soon as possible
> thank you very much

Ttf2pt1 can do it reasonably decently. http://ttf2pt1.sf.net 
Look in the Snapshots for the most recent version.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts


Re: [Fonts]hinting & anti-aliasing

2002-08-25 Thread Sergey Babkin

"James H. Cloos Jr." wrote:
> 
> >>>>> "Sergey" == Sergey Babkin <[EMAIL PROTECTED]> writes:
> 
> Sergey> just make the hinting instructions work in terms of
> Sergey> full pixels. Then multiply whatever coordinates they produce
> Sergey> by 2 or 4 to convert them into subpixels.
> 
> Freetype itself could work wither way, but that is how Xft handles aa.
> 
> Except that the specified axis is expanded by 3, not 2 or 4.
> 
> That said, many users find the fonts look better when freetype is told
> not to hint them.  I find some fonts are best w/ the hinting/
> instructing and some are better w/o.

As far as I understand from looking at the FreeType page, it has
a problem with fonts having many unneccessary intermediate points
on the curves. If you look again at the example in

http://ttf2pt1.sf.net/SNAPSHOT/dust.ps.gz 

you can see a lot of red dots on the black curves. The problem
is that if you move the endpoints of the curve around according
to the hinting, you change not the whole curve but only its
section to the next intermediate point. The result is a monstrous
bulge. Worse yet, many TTF fonts have curves crossing the vertical
or horizontal tangents (i.e. the curve goes up and then down,
without interrupting at the topmost point). Adobe has described
these problems in the Type1 specification and strongly advised
how to design the outlines properly. On the other hand, most of
the TTF font designers don't seem to know about them. To do
hinting of any reasonable quality the outlines have to be cleaned up 
in advance co conform to Adobe's rules, similarly to what
is shown on the diagrams. The diagrams are the result of the
algorithm in ttf2pt1 that replaces these short curve fragments
with one [almost] identical long curve. The algorithm works on
the cubic Bezier curves but I believe can be adapted to the
quadratic curves just as well or better. The downside is that
it works by sequential approximation and thus is not very fast,
so it's better to be ran in advance rather than when opening a font.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]Re: [Freetype] FreeType 2 changes required for XFree86

2002-04-18 Thread Sergey Babkin

Juliusz Chroboczek wrote:
> 
> Hi Antoine!
> 
> So nice to hear from you.
> 
> BS> Defining common names like ''read'' always leads to problems
> BS> when using multiple packages.
> 
> BS> Why doesn't XFree86 follow common C protocol and use uppercase?
> 
> >> The goal being to use common source code both in the X server (when
> >> using the wrappers) and outside it, it would be rather pointless to
> >> use ``common C protocol'', wouldn't it?
> 
> AL> I am not sure you (both Brian and Juliusz) will have a similar dispute
> AL> about tolower or malloc, would you?
> 
> We're not having a dispute.  A dispute is a form of exchange, and in
> this case Brian is obviously not listening.
> 
> Brian is absolutely right that all-caps names should be used for
> processor defines in the ordinary case, and XFree86 code follows this
> convention religiously.  The definitions done in xf86_ansic.h are in a
> completely different situation, and Brian's received wisdom does not
> apply to them.
> 
> In XFree86 modules that include xf86_ansic.h, a number of libc symbols
> (standard or not, that's not the point) are redirected to their
> cross-platform xf86_* equivalents.  Due to the lack of a module system
> in C, this redirection is done at the preprocessor level:
> 
>   #define read(x, y, z) xf86_read(x, y, z)
>   #define tolower(x) xf86_tolower(x)
>   ... etc ...
> 
> Obviously, the fact that it's the very names used by libc that are
> redefined is the very essence of the hack in question.  Suggesting
> that we redefine some other names instead is missing the point
> althegither.

I guess what Brian is trying to say is that it's much cleaner to do it
the other way around: use xf86_read() etc. throughout the code
and then if you are compiling this code not in the XF86 server
then include a header that would do defines like

#define xf86_read(x, y, z) read(x, y, z)
 
The way it's done now is an extremely dirty hack.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]Outlines to borrow

2002-02-28 Thread Sergey Babkin

Roozbeh Pournader wrote:
> 
> I and my team are developing a set of Persian OpenType fonts, to
> contribute to XFree86 (and other projects). Can someone tell me that from
> which fonts may I steal (read borrow) the glyph outlines for ASCII
> characters and other punctuations (open double quotes, etc)?

I have some Public Domain TrueType fonts. The hinting in them
is probably not good but I guess you can use the outlines themselves.
Please let me know if you would want to get them.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]Another approach to text in X

2002-02-28 Thread Sergey Babkin

Alexander Gelfenbain wrote:
> 
> On Mon, Feb 25, 2002 at 12:38:28PM -0800, Erik van der Poel wrote:
> > Alan Coopersmith wrote:
> > >
> > > It is our belief that leaving font rendering on the server side will be more
> > > efficient than sending the bits over from the client side.  Of course, we can't
> > > prove this until we've actually done it, so we don't know for sure.
> >
> > It would be interesting to see the results. I'm curious about laying out
> > text, drawing it, and selecting it (with the mouse).
> 
> Unfortunately we have not yet implemented highlights and hit testing. The idea
> is that the server will manage an encapsulated text object and it will
> be able to highlight a selection without exchanging any metrics data with
> the client.

How about breaking the text into lines ? You just have to get the
metrics for separate words in the line and if you split the words
then of the separate syllables in the last word for that. Another
example is the text justification: it either has to be done completely
at the server or again the metrics for separate words should be 
received by the client and used to compute the positions of the words.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



[Fonts]a font server backwards ?

2001-12-28 Thread Sergey Babkin

All,

I've been thinking about the fonts stuff and I think I've got
an interesting idea about the font servers.

Normally a font server runs as a TCP/IP server and the X server
connects to it as a client. This is not very convenient because
it makes running the running of a font server by a random user
not very easy. Also if it happens that the font server crashes
or has not been started, the X server tends to freese.

As far as I understand, the Render extension allows an application
to provide bitmaps to be used as fonts. Hovewer these fonts are
used only by one application and can't be shared with the others.

So a logical next step seems to be an "X-client font server".
The idea is that the font server connects to the X server as a 
client, and then does a call indicating that it's a font server.
At this point the X server adds this new font server to its font path
(I guess, either at the beginning or the end, depending on the options)
and uses it as a normal font server, with fonts available to all
the X clients. If this connection drops, the X server will silently
remove this font server from its font path and go on. This makes
such things as starting a personal font server from .profile
easy and reliable.

Well, the catch is that I don't know enough about the internal
workings of the X server and the font protocol to actually implement
it (nor really have time) :-(

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]Another approach to text in X

2001-12-20 Thread Sergey Babkin

Alexander Gelfenbain wrote:
> 
> On Wed, Dec 19, 2001 at 07:20:45PM -0500, Sergey Babkin wrote:
> > Alan Coopersmith wrote:
> >
> > > applications.  We have designed a display and platform-independent text
> > > architecture, the Standard Type Services (ST) framework, which handles
> > > not just font rendering, but text layout and font management as well.
> > > ST incorporates typographically sophisticated features and ideas from
> > > the best regarded existing APIs, including Apple Type Services for
> > > Unicode Imaging (ATSUI) and Java2D TextLayouts.  On top of ST, we have
> > > layered a new extension to the X protocol, called XST, which
> > > incorporates the ST functionality.  The ST API will also be exposed to
> > > applications independant of the X environment so that it can be used
> >
> > It would be good if it also could provide the output in PostScript.
> 
> It would be capable of generating outlines. Converting them to PostScript
> is trivial.

I think, not quite trivial. I guess I should first explain that
I don't want to sound ungrateful, and the way it is now this
architecture looks very interesting and useful. Just it seems to me
that it's a great opportunity to fix the historical X's weakness
with printing. And seeing it missed once again would be a pity.

Basically, rendering the general graphics in PostScript is easy
and does not require much effort. Rendering of the text is much
harder. The major thing making it complicated is the fonts. Of
course, transferring the outlines of a rendered page back is a
possible thing but it means large size of the resulting file and
slow rendering to bitmaps at the printer. Providing a way to convert 
the used fonts to PostScript fonts, transferring them to the client 
and then rendering the pages in terms of these fonts looks like a much 
better thing. And probably provide a protocol to get the kerning
information on to the client (unless all the rendering including 
kerning is done at the server side).

Such a conversion is "trivial" too in the sense that it's clear
how it can be done, the only difficulty is to actually do it
and to provide an X protocol extension for such a transfer:

- the Type1 fonts can be transferred directly, only with the encoding
table changed according to X the server's idea about it and with
the large fonts split into multiple 8-bit fonts (and/or possibly 
then combined into a Type0 composite font)

- the TrueType fonts can be either converted to Type42 with the
algorithm taken from ttf2type42 or converted to Type1 with the
algorithm taken from ttf2pt1

- the other fonts can be rasterized to bitmaps and then converted
to the Type1 fonts with the algorithm taken from ttf2pt1

Actually, one more possibility is to take the outlines produced
from any kind of font and feed them into the algorithm from ttf2pt1.

Basically, what I'm trying to say is that since yet another extension
is being added to the X protocol, it would be nice to include this
font transfer ability into it.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]Another approach to text in X

2001-12-19 Thread Sergey Babkin

Alan Coopersmith wrote:

> applications.  We have designed a display and platform-independent text
> architecture, the Standard Type Services (ST) framework, which handles
> not just font rendering, but text layout and font management as well.
> ST incorporates typographically sophisticated features and ideas from
> the best regarded existing APIs, including Apple Type Services for
> Unicode Imaging (ATSUI) and Java2D TextLayouts.  On top of ST, we have
> layered a new extension to the X protocol, called XST, which
> incorporates the ST functionality.  The ST API will also be exposed to
> applications independant of the X environment so that it can be used

It would be good if it also could provide the output in PostScript.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]changing desktop font size and type

2001-10-18 Thread Sergey Babkin

Louis Lu wrote:
> 
> Hi
> 
>is there anyone who knows how to change the
> font type and size of the desktop.  Is the xset the correct
> command? if it is, How I use this command.

Highly unlikely. Probably what you need is xrdb or just to add
entries into $HOME/.Xdefaults.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]freettf project?

2001-10-15 Thread Sergey Babkin

Vadim Plessky wrote:
> 
> On Monday 15 October 2001 01:43, Sergey Babkin wrote:
> |   Vadim Plessky wrote:
> |   > Problem with Pragmatica and Newton that their hinting is terrible, and
> |   > I just can't use them for display. Quality for printed material is very
> |   > good, indeed!
> |
> |   I wonder, have you tried to auto-rehint them ? Say, with PfaEdit ?
> 
> I tried auto-hint in FontLab 2.5.
> For printing: result is good.

For printing at high resolutions the hinting just does not matter
because the changes is produces are not visible anyway (they
are +-1 pixel, so when each pixel is small enough this difference
is negligible).

> Problem is with *screen*, as FT 2.0.4 doesn't support PS T1 native hints

So why not use the X11's traditional implementation of the Type1
rasterizer (which is also available as T1Lib) ? Or has it been
already phased out ouf XFree86 in favor of FreeType ?

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]freettf project?

2001-10-14 Thread Sergey Babkin

Vadim Plessky wrote:
> 
> Problem with Pragmatica and Newton that their hinting is terrible, and I just
> can't use them for display. Quality for printed material is very good,
> indeed!

I wonder, have you tried to auto-rehint them ? Say, with PfaEdit ? 
Or convert with ttf2pt1 to Type1 with autohinting ?

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]freettf project?

2001-10-10 Thread Sergey Babkin

Sergej Malinovski wrote:
> 
> Sergey Babkin wrote:
> > It would be real nice if the fonts had the same license as XFree86.
> > That is, _NOT_ GPL.
> 
> Let's suppose GPL could be applied (so to speak) to fonts. What
> exactly would you not like about GPL'ed fonts?

Limitation on the derived fonts. For example, if someone creates
a font with Latin set of glyphs and then someone else comes
and adds the Cyrillic glyphs then the result is:
with GPL: the resulting font including the Cyrillic glyphs
gets covered by GPL as well
with (BSD or MIT or X)-style license and I believe LGPL too: the
addition does not get under GPL and its author may do with the 
resulting font whatever he wants

Of course these GPL effects may be a good thing too. But there
are ways to work around the GPL requirements as well - for example,
make the Cyrillic glyphs into a separate font and combine these
two fonts into one at loading time.

Another bad thing about GPL is that changing the license
afterwards is difficult. Any GPLed piece would contaminate the
result, so theoretically all the contributors have to be
contacted. On the other hand, going in the reverse direction,
from a BSD/MIT/X license to GPL is easy: just add a GPLed piece
and the whole combination gets contaminated.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]freettf project?

2001-10-10 Thread Sergey Babkin

Sergej Malinovski wrote:
> 
> Sergey Babkin wrote:
> > I'm not sure whether the TTF fonts can be considered programs
> > but the Type1 fonts surely are. Besides, in any case the fonts
> > are works of art and get under the general copyright concept.
> 
> In a sense they are programs, but do you have a concept of "closed
> source" fonts for example?

Well, for example when Adobe introduced the Type1 format they 
did not disclose the (primitive) encrypting algorithm used in it. 
So the fonts very quite closed. I think later people have
figured out this algorithm or maybe Adobe has decided to fight
for the market presence, so eventually they've published it.
But as an artifact of this original design decision every Type1
font is still encrypted even though it makes no sense whatsoever.

Or if you look at the TTF format, the hinting program is compiled
into a sort of byte code.
 
> Yes, they get under the general copyright, but the purpose of most
> kinds of free licenses is the opposite of copyright -- to give more
> freedom than general copyright allows.

If they are under copyright then you can apply any sort of
a license to them.
 
-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts



Re: [Fonts]freettf project?

2001-10-09 Thread Sergey Babkin

Sergej Malinovski wrote:
> 
> The question is, if you were to make "Free" fonts, how do the standard
> free licences apply to fonts? A font isn't exactly a program with it's
> binary and a source...

I'm not sure whether the TTF fonts can be considered programs
but the Type1 fonts surely are. Besides, in any case the fonts
are works of art and get under the general copyright concept.
 
> It would be interesting hear RMS's opinion, because I sure he has made
> some thoughts on the subject because a Free GNU system need Free
> fonts. I was thinking of sending an email to gnu.org with questions on

It would be real nice if the fonts had the same license as XFree86.
That is, _NOT_ GPL.

-SB
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts