Board index » delphi » Metafiles And Text Justification

Metafiles And Text Justification

If I call SetTextJustification in the context of an Enhanced Windows
Metafile on Windows 2000 (Using Delphi 5) , the text is NOT justified, even
though the call works.

My application works perfectly well on Windows 98 and Windows NT.

I believe that this is a bug in Windows 2000 since I can also recreate the
problem using MS visual C++.

My problem is that raising a bug with Microsoft is impossible. I am hoping
that someone from Borland/Inprise might take this one on?

I can supply the source if necessary.

Pete Bartlett

 

Re:Metafiles And Text Justification


-----------------------------------------------------------------------
This solution is brought to you by Joe Hecht's TExcellent products,
solving Form.Print and bitmap printing problems. Joe Hecht's TExcellent
products can be found at: http://www.code4sale.com/joehecht
-----------------------------------------------------------------------
Text under Metafiles is buggy at best. I have seen many metafiles
where the font changes (like Times to Symbol) when the metafile is
scaled. Character spacing is never guarenteed.

If possible, dont use metafiles.

Joe

Quote
"pete.bartlett" <pete.bartl...@ic24.net> wrote in message

news:39e4bd89_2@dnews...
Quote
> If I call SetTextJustification in the context of an Enhanced Windows
> Metafile on Windows 2000 (Using Delphi 5) , the text is NOT justified,
even
> though the call works.

> My application works perfectly well on Windows 98 and Windows NT.

> I believe that this is a bug in Windows 2000 since I can also recreate the
> problem using MS visual C++.

> My problem is that raising a bug with Microsoft is impossible. I am hoping
> that someone from Borland/Inprise might take this one on?

> I can supply the source if necessary.

> Pete Bartlett

Re:Metafiles And Text Justification


"Joe C. Hecht" <joehe...@code4sale.com> wrote in message
news:39e4ea3d$1_2@dnews...

Quote
> -----------------------------------------------------------------------
> This solution is brought to you by Joe Hecht's TExcellent products,
> solving Form.Print and bitmap printing problems. Joe Hecht's TExcellent
> products can be found at: http://www.code4sale.com/joehecht
> -----------------------------------------------------------------------

> Text under Metafiles is buggy at best. I have seen many metafiles
> where the font changes (like Times to Symbol) when the metafile is
> scaled. Character spacing is never guarenteed.

> If possible, dont use metafiles.

So what other options do we have? What other vector based image formats are
available? And what formats are easy to convert to and from?

It would be nice if Microsoft's own format worked. Oh wait, its part of
windows that explains it.

Quick Note: Fonts work fine when placing a wmf on an Ms-Access report, but
the API calls don't, go figure.

Dan

Re:Metafiles And Text Justification


I saw an explanation of the MicroSoft Apps phenomenon on one of the news
groups here some time ago.

Borland apparently have had tons of problems implementing MS controls
(common and external controls) into the VCL because they contain bugs.
That's why treeview and other external controls behave badly if the user
doesn't have the latest dll's which usually are the ones shipped with the
latest version of Internet Explorer.

Now,  it has been said (apparently) that the MicroSoft apps guys (excel,
word etc...) don't use these (obviously because they're full of bugs) and
instead wrote their own versions specifically for these applications.
Microsoft however seem to not want anyone else to have working versions of
these (or do they? - it's hard to tell).

If all this hear-say is in fact true,  then it stands to reason that the
apps guys (Word, Excel etc...) also wrote their own EMF, WMF stuff which
does actually work and probably doesn't use the API at all.  It certainly
looks that way if the font story you gave us is accurate.

There isn't much we can do other than to write our own replacements for the
API functions that don't work (if it's possible,  which often it isn't since
we don't have the original source code).

Microsoft think they can get away with this,  but I have several solutions
to this problem (and moving to Linux isn't one of them).  I wonder if
Borland ever thought about this issue seriously themselves.

Regards

Stan Stern.

Re:Metafiles And Text Justification


Quote
"Stan Stern" <s...@jetcam.net> wrote in message

news:8s6mls$4bg6@bornews.borland.com...

Quote
> I saw an explanation of the MicroSoft Apps phenomenon on one of the news
> groups here some time ago.

> Borland apparently have had tons of problems implementing MS controls
> (common and external controls) into the VCL because they contain bugs.
> That's why treeview and other external controls behave badly if the user
> doesn't have the latest dll's which usually are the ones shipped with the
> latest version of Internet Explorer.

Understandable.

Quote
> Now,  it has been said (apparently) that the MicroSoft apps guys (excel,
> word etc...) don't use these (obviously because they're full of bugs) and
> instead wrote their own versions specifically for these applications.
> Microsoft however seem to not want anyone else to have working versions of
> these (or do they? - it's hard to tell).

Figures.

Quote
> If all this hear-say is in fact true,  then it stands to reason that the
> apps guys (Word, Excel etc...) also wrote their own EMF, WMF stuff which
> does actually work and probably doesn't use the API at all.  It certainly
> looks that way if the font story you gave us is accurate.

We take pcl forms and convert them to wmf to use as a background image in
Access97 reports. We have been doing so for about a year or more. We have
had ZERO problems with this, all fonts work proporly all the time, and the
output is very good. The only problem is that its Access, we're trying to
find something else that proporly supports wmfs. At least I know Microsoft
can write something that works, its just a shame that they don't have a
solid API yet!

Quote
> There isn't much we can do other than to write our own replacements for
the
> API functions that don't work (if it's possible,  which often it isn't
since
> we don't have the original source code).

I'm interested in writing my own tools for wmfs, but don't have the time to
do it myself. I found a libwmf for linux, I haven't looked at it yet, but
I'm interested in whether it could be ported to windows.

There is MetaDraw's WMF OCX, which does everything you would want to do to
wmfs, but its $500, and more if you want any of the extra plugins. I know it
gives them a product and a job, but it would be nice if Microsoft proporly
supported wmf's in their API.

Quote
> Microsoft think they can get away with this,  but I have several solutions
> to this problem (and moving to Linux isn't one of them).  I wonder if
> Borland ever thought about this issue seriously themselves.

We would end up with bigger applications and/or more dependencies on runtime
packages, but if Borland were to write there own controls that worked
instead of wrapping the microsoft ones, I'd prefer it.

Dan Downs

Other Threads