ErlGuten question

Chris Pressey cpressey@REDACTED
Wed Apr 9 23:55:25 CEST 2003


On Wed, 9 Apr 2003 22:38:19 +0200
Mikael Karlsson <mikael.karlsson@REDACTED> wrote:

> Hi Chris,
> for the low level;
> I think this works for erlguten 2.1.
> 
> /Mikael
> 
> get_string_width(PID, Fontname, PointSize, Str)->
>     FontIndex = pdf:get_font_alias(PID, Fontname),
>     trunc(erlguten_line_break:sizeof(FontIndex, Str) *
>     PointSize/1000).

Thanks, that does the trick!

There's a little weirdness though.  Nothing I can't work around, but I'm
curious...

I start erl with the equivalent of -pa ~/projects/*/ebin , to add all my
local packages to the search path.

So I made a subdirectory, erlguten-2.1/ebin , and moved all of its .beam
files into it.

This seems to work fine for almost everything, except one thing:
pdf:get_font_alias/2 hangs.  It just never returns.

pdf:get_font_alias/2 only works if I don't move the .beam files, and run
erl with -pa ~/projects/erlguten-2.1

Any idea why this might be?

-Chris



More information about the erlang-questions mailing list