Re: Prima & Debian

From: Serge Olkhowik <solo_at_isd.dp.ua>
Date: Tue, 25 Nov 2003 19:13:59 +0200
To: prima_at_prima.eu.org

On 25 Nov 2003 11:57:39 +0100
 Dmitry Karasik (Dmitry) wrote:

 Serge> And one more question - is it possible to create ppm-ready packages
 Serge> for ASP?

 Dmitry> Have no idea.

Ok, I'll try it after Debian ;)

I like package managing because it simplifies installing/removing.

 Serge> Ok, I made some patch for 1.13:

 Dmitry> The patch doesn't work for perl 5.6 and below, because
 Dmitry> install.vendor* variables are not defined there. Also, the scheme
 Dmitry> with $PREFIX deduction from INSTALLSITEARCH and INSTALLSITELIB,
 Dmitry> which might be unnecessary for 5.8, is needed for 5.6. Plus, I see
 Dmitry> at least one 5.8 setup where install.vendor* set to 'undef', which
 Dmitry> is valid and seems to hinting to use install.site* .

Ok, I have some compilation machines with MSVC and perl 5.6.1 so I'll try
to make more flexible patch ;)
 
 Dmitry> Xft support requires presence of fontconfig, freetype2, xrender,
 Dmitry> and iconv.

Hmm.. This is strange but:

% COLUMNS=100 dpkg -l fontconfig \*freetype\* libxrender\* libtext-iconv-perl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===================-===================-======================================================
ii fontconfig 2.2.1-8 generic font configuration library
ii libfreetype6 2.1.5-3 FreeType 2 font engine, shared library files
ii libfreetype6-dev 2.1.5-3 FreeType 2 font engine, development files
ii libxrender-dev 0.8.3-4 X Rendering Extension client library (development file
ii libxrender1 0.8.3-4 X Rendering Extension client library
ii libtext-iconv-perl 1.2-2 Convert between character sets in Perl

I should read Makefile.PL again to point how it checks xft.

 Serge> Ok, I built 1.13 and I try --debug=mf on koi8-r script:
 Serge> (with Prima*font: -*-arial-medium-r-*-*-14-*-*-*-*-*-*-* line at
 Serge> .Xresources)

 Dmitry> I think this is a bug. I committed a fix for this, check if the
 Dmitry> latest unix/apc_font.c would solve the problem.

I refreshed from CVS and built it. Font size looks normal ;)

But the problem with encoding is still not resolved.

 Dmitry> I was wrong - if you set a font via XRDB or command line,

But I have a such line in my .Xresources:

*font: -*-arial-medium-r-*-*-14-*-*-*-*-*-koi8-r

So how I can disable it for Prima apps?

I can remove this line from .Xresources but I'm afraid that font is defined
in some global resources when starting X11.

 Dmitry> then the encoding is not deduced and you're at mercy of your X
 Dmitry> font server - the first met encoding wins.

Ok, I removed any lines which may affect Prima resources and tried again
with --font option. For example:

% ./prima-utf --font='-*-arial-medium-r-normal-*-14-*-*-*-*-*-*-*' --debug=mf
....
font: -*-arial-medium-r-normal-*-14-*-*-*-*-*-*-* parsed to: 20.[w=6,s=10].arial.iso8859-1
default font: 20.[w=6,s=10].arial.iso8859-1
menu font: 20.[w=6,s=10].arial.iso8859-1
widget font: 20.[w=6,s=10].arial.iso8859-1
msg font: 20.[w=6,s=10].arial.iso8859-1
caption font: 20.[w=6,s=10].arial.iso8859-1

This is strange. But I got russian 'χΩΘΟΔ' ;)

And when running:

% ./prima-utf --font=Arial-14 --debug=mf

I got

font: cannot load Arial-14
default font: 20.[w=7,s=12].helvetica.iso8859-1
menu font: 20.[w=7,s=12].helvetica.iso8859-1
widget font: 20.[w=7,s=12].helvetica.iso8859-1
msg font: 20.[w=7,s=12].helvetica.iso8859-1
caption font: 20.[w=7,s=12].helvetica.iso8859-1

Next I tried koi8-r sources:

% ./prima-koi8 --font='-*-arial-medium-r-normal-*-14-*-*-*-*-*-*-*' --debug=mf

I got

font: -*-arial-medium-r-normal-*-14-*-*-*-*-*-*-* parsed to: 20.[w=6,s=10].arial.iso8859-1
default font: 20.[w=6,s=10].arial.iso8859-1
menu font: 20.[w=6,s=10].arial.iso8859-1
widget font: 20.[w=6,s=10].arial.iso8859-1
msg font: 20.[w=6,s=10].arial.iso8859-1
caption font: 20.[w=6,s=10].arial.iso8859-1

Encoding is broked. So I should try:

% ./prima-koi8 --font='-*-arial-medium-r-normal-*-14-*-*-*-*-*-koi8-r' --debug=mf

And all is ok.

So if I set font in xrdb:

Prima*font: -*-arial-medium-r-normal-*-14-*-*-*-*-*-*-*

my utf exmaple is ok, but koi8 is broked.

And I can't override it with --font setting from commad-line :(

 Dmitry> This is probably a bug, although resolved easily by explicit
 Dmitry> indication of the desired encoding.

But how can I setup font for my own Prima-based app? My simple example has
this property:

WM_CLASS(STRING) = "Prima::Window", "Prima"

-- 
Serge Olkhowik <solo_at_isd.dp.ua>
ISD Configuration Management Team <cm_at_isd.dp.ua>
Received on Tue 25 Nov 2003 - 18:14:42 CET

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:05 CET