Install pcf.gz fonts into share/apps/konsole/fonts. Give the user option of installing the bdf/pcf fonts into fonts:/Personal at startup. Generate the pcf.gz from the bdf at compile time.

svn path=/trunk/KDE/kdebase/konsole/; revision=419607
wilder-portage
Kurt Hindenburg 21 years ago
parent 25be086a6a
commit 29ac421ec8
  1. 99671
      fonts/9x15.bdf
  2. BIN
      fonts/9x15.pcf.gz
  3. 15
      fonts/Makefile.am
  4. BIN
      fonts/console8x16.pcf.gz
  5. BIN
      fonts/console8x8.pcf.gz
  6. 41
      konsole/main.cpp

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -1,5 +1,5 @@
fontdir = $(datadir)/fonts
font_DATA =console8x16.pcf.gz console8x8.pcf.gz 9x15.pcf.gz
fontdir = $(kde_datadir)/konsole/fonts
font_DATA =console8x16.pcf.gz 9x15.pcf.gz
EXTRA_DIST = $(font_DATA)
@ -7,7 +7,12 @@ EXTRA_DIST = $(font_DATA)
install-data-hook:
-mkfontdir $(DESTDIR)$(fontdir)
# edit with xmbdfed console8x16.bdf
fonts: $(srcdir)/console8x16.bdf
console8x16.pcf.gz: $(srcdir)/console8x16.bdf
bdftopcf -o console8x16.pcf $(srcdir)/console8x16.bdf
gzip -c --best console8x16.pcf > $(srcdir)/console8x16.pcf.gz
gzip --best console8x16.pcf
# gzip -c --best console8x16.pcf > console8x16.pcf.gz
9x15.pcf.gz: $(srcdir)/9x15.bdf
bdftopcf -o 9x15.pcf $(srcdir)/9x15.bdf
gzip --best 9x15.pcf
# gzip -c --best 9x15.pcf > 9x15.pcf.gz

Binary file not shown.

Binary file not shown.

@ -30,6 +30,8 @@
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kglobalsettings.h>
#include <kio/netaccess.h>
#include <kmessagebox.h>
#include <config.h>
@ -595,6 +597,45 @@ extern "C" int KDE_EXPORT kdemain(int argc, char* argv[])
m->setAutoClose(auto_close);
}
// In KDE 3.5, Konsole only allows the user to pick a font via
// KFontDialog. This causes problems with the bdf/pcf files
// distributed with Konsole (console8x16 and 9x15).
// Trying to automatically install the font causes problems with
// session management... Also trying to restart Konsole
// automatically is problematic...
// So just notify user...
QStringList sl_installFonts;
{
QFont f;
f.setRawName("-misc-console-medium-r-normal--16-160-72-72-c-80-iso10646-1");
QFontInfo fi( f );
if ( !fi.exactMatch() )
sl_installFonts << "console8x16.pcf.gz";
}
{
QFont f;
f.setRawName("-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1");
QFontInfo fi( f );
if ( !fi.exactMatch() )
sl_installFonts << "9x15.pcf.gz";
}
if ( !sl_installFonts.isEmpty() )
if ( KMessageBox::questionYesNoList( 0,
i18n( "If you want to use the bitmap fonts distributed with Konsole, they must be installed. After installation, you must restart Konsole to use them. Do you want to install the fonts listed below into fonts:/Personal?" ),
sl_installFonts,
i18n( "Install Console Font?" ),
KGuiItem( i18n("&Install" ) ),
KStdGuiItem::no(), "installbdffonts" ) == KMessageBox::Yes )
{
// We are currently ignoring errors....
for ( QStringList::iterator it = sl_installFonts.begin();
it != sl_installFonts.end(); ++it ) {
QString sf = "fonts/" + *it;
KIO::NetAccess::copy( locate( "appdata", sf ), "fonts:/Personal/", 0 );
}
}
int ret = a.exec();
//// Temporary code, waiting for Qt to do this properly

Loading…
Cancel
Save