ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* texfont bugs
@ 2003-09-24 13:45 Adam Lindsay
  2003-09-24 15:17 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Lindsay @ 2003-09-24 13:45 UTC (permalink / raw)


Hi folks.

Looks like the current texfont is a bit broken right now. I believe it's
the introduction of the "if ($IsWin32) " block: the pragma "use
Win32::API" doesn't seem to work within the conditional block.

Furthermore, I'm not sure the else block that follows comes to a sane
ending, so I was unsure of the fix.

I take it the change was to address embedded spaces on windows systems?
I'm all in favour of tying up loose x-platform ends (esp those I may have
left in my wake), but I think there's been a step backwards.

Cheers,
adam
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay                      atl@comp.lancs.ac.uk
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: texfont bugs
  2003-09-24 13:45 texfont bugs Adam Lindsay
@ 2003-09-24 15:17 ` Hans Hagen
  2003-09-24 16:21   ` Adam Lindsay
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2003-09-24 15:17 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

At 14:45 24/09/2003 +0100, you wrote:

>Looks like the current texfont is a bit broken right now. I believe it's
>the introduction of the "if ($IsWin32) " block: the pragma "use
>Win32::API" doesn't seem to work within the conditional block.

can you try the attached version?

Hans

[-- Attachment #2: texfont.zip --]
[-- Type: application/zip, Size: 10009 bytes --]

[-- Attachment #3: Type: text/plain, Size: 597 bytes --]

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: texfont bugs
  2003-09-24 15:17 ` Hans Hagen
@ 2003-09-24 16:21   ` Adam Lindsay
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Lindsay @ 2003-09-24 16:21 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]

That still didn't work, but it was a lot clearer to figure out what to do.

So with a little help from the Camel book, I figured out how to wrap the
conditional 'use' in a way that works (well, compiles) on my (non-Win32)
system at least:

my $IsWin32;

BEGIN {
  $IsWin32 = ($^O =~ /MSWin32/i);

  if ($IsWin32) {
    require Win32::API; import Win32::API;
  } 
}

I'm sure there are Perl wizards out there who know how to do this sort of
thing much more elegantly.

Cheers,
adam

Next up: how to use this to steal the Lucida fonts from Java on Mac OS X...

Hans Hagen said this at Wed, 24 Sep 2003 17:17:08 +0200:

>At 14:45 24/09/2003 +0100, you wrote:
>
>>Looks like the current texfont is a bit broken right now. I believe it's
>>the introduction of the "if ($IsWin32) " block: the pragma "use
>>Win32::API" doesn't seem to work within the conditional block.
>
>can you try the attached version?
>
>Hans
>-------------------------------------------------------------------------
>                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
>                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
>-------------------------------------------------------------------------
>                        information: http://www.pragma-ade.com/roadmap.pdf
>                     documentation: http://www.pragma-ade.com/showcase.pdf
>-------------------------------------------------------------------------

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay                      atl@comp.lancs.ac.uk
 Computing Dept, Lancaster University   +44(0)1524/594.537
 Lancaster, LA1 4YR, UK             Fax:+44(0)1524/593.608
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

[-- Attachment #2: texfont-atl.zip --]
[-- Type: application/zip, Size: 9920 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-24 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-24 13:45 texfont bugs Adam Lindsay
2003-09-24 15:17 ` Hans Hagen
2003-09-24 16:21   ` Adam Lindsay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).