mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
use GNU FreeFont as last resort font
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b1bca4fb69
commit
0cbaca86a7
18 changed files with 41 additions and 42 deletions
|
@ -2236,7 +2236,7 @@ DOT_NUM_THREADS = 0
|
|||
# The default value is: Helvetica.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_FONTNAME = Helvetica
|
||||
DOT_FONTNAME = FreeSans
|
||||
|
||||
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
|
||||
# dot graphs.
|
||||
|
|
|
@ -13,6 +13,7 @@ license=('LGPL' 'BSD')
|
|||
depends=('libsm' 'libxcursor' 'libxinerama' 'libxpm' 'libxrandr' 'fontconfig'
|
||||
'icu' 'jansson' 'libcups' 'xdg-utils')
|
||||
makedepends=('cmake' 'git' 'unifdef')
|
||||
optdepends=('gnu-free-fonts: last resort font')
|
||||
source=("git+https://github.com/fluxer/katie")
|
||||
sha1sums=('SKIP')
|
||||
conflicts=('katie')
|
||||
|
|
|
@ -15,7 +15,7 @@ Package: katie-runtime
|
|||
Architecture: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x hurd-i386
|
||||
Section: x11
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, xdg-utils
|
||||
Recommends: xserver-xorg-core
|
||||
Recommends: xserver-xorg-core fonts-freefont-ttf
|
||||
Description: C++ toolkit derived from the Qt 4.8 framework
|
||||
Katie is continuation of the Qt4 C++ toolkit with the goal to keep it alive,
|
||||
clean it up, fix some bugs and backport some features from Qt5. It is based
|
||||
|
|
|
@ -8,7 +8,7 @@ License: BSD and LGPLv2+
|
|||
URL: https://github.com/fluxer/katie
|
||||
|
||||
BuildRequires: gcc-c++ cmake libicu-devel libzstd-devel jansson-devel zlib-devel libpng-devel freetype-devel pcre-devel openssl-devel libX11-devel libXinerama-devel libXrandr-devel libXrender-devel libXfixes-devel libXcursor-devel libSM-devel libICE-devel dbus-devel fontconfig-devel cups-devel unifdef
|
||||
Requires: xdg-utils
|
||||
Requires: xdg-utils gnu-free-fonts
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(postun): /sbin/ldconfig
|
||||
Requires(post): desktop-file-utils
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/
|
||||
# https://docs.freebsd.org/en/books/porters-handbook/
|
||||
|
||||
PORTNAME = katie
|
||||
DISTVERSION = 4.12.0.d20201231
|
||||
|
@ -16,7 +16,8 @@ WRKSRC = ${WRKDIR}/katie-master
|
|||
USES = compiler:c++11-lang pkgconfig cmake ssl xorg desktop-file-utils
|
||||
USE_XORG = x11 xinerama xrandr xrender xfixes xcursor xext xpm sm ice
|
||||
USE_LDCONFIG = yes
|
||||
RUN_DEPENDS = xdg-open:devel/xdg-utils
|
||||
RUN_DEPENDS = xdg-open:devel/xdg-utils \
|
||||
${LOCALBASE}/share/fonts/freefont-ttf/FreeSans.ttf:x11-fonts/freefont-ttf
|
||||
LIB_DEPENDS = libzstd.so:archivers/zstd libicuuc.so:devel/icu \
|
||||
libicui18n.so:devel/icu libjansson.so:devel/jansson \
|
||||
libpcre.so:devel/pcre libpng.so:graphics/png \
|
||||
|
|
|
@ -22,6 +22,7 @@ USE_TOOLS = pkg-config msgfmt
|
|||
DL_AUTO_VARS = yes
|
||||
|
||||
DEPENDS = xdg-utils-[0-9]*:../../misc/xdg-utils
|
||||
DEPENDS += freefont-ttf-[0-9]*:../../fonts/freefont-ttf
|
||||
BUILD_DEPENDS = unifdef-[0-9]*:../../devel/unifdef
|
||||
|
||||
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
|
||||
|
|
|
@ -20,7 +20,7 @@ WRKSRC = ${WRKDIR}/katie-master
|
|||
COMPILER = base-clang ports-gcc
|
||||
MODULES = devel/cmake
|
||||
BUILD_DEPENDS = devel/gettext,-tools
|
||||
RUN_DEPENDS = devel/desktop-file-utils devel/xdg-utils
|
||||
RUN_DEPENDS = devel/desktop-file-utils devel/xdg-utils fonts/freefont-ttf
|
||||
LIB_DEPENDS = archivers/zstd textproc/icu4c devel/jansson devel/pcre \
|
||||
graphics/png x11/dbus print/cups,-libs devel/gettext,-runtime
|
||||
WANTLIB = ${COMPILER_LIBCXX} ICE SM X11 Xcursor Xext Xfixes Xinerama Xrandr \
|
||||
|
|
|
@ -637,7 +637,7 @@ QPixmap QDeclarativeTextPrivate::drawOutline(const QPixmap &source, const QPixma
|
|||
\qml
|
||||
Text {
|
||||
text: "Hello World!"
|
||||
font.family: "Helvetica"
|
||||
font.family: "FreeSans"
|
||||
font.pointSize: 24
|
||||
color: "red"
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ QDeclarativeText::~QDeclarativeText()
|
|||
|
||||
Sets the family name of the font.
|
||||
|
||||
The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]".
|
||||
The family name is case insensitive and may optionally include a foundry name, e.g. "FreeSans [GNU]".
|
||||
If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen.
|
||||
If the family isn't available a family will be set using the font matching algorithm.
|
||||
*/
|
||||
|
|
|
@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
|
|||
TextEdit {
|
||||
width: 240
|
||||
text: "<b>Hello</b> <i>World!</i>"
|
||||
font.family: "Helvetica"
|
||||
font.family: "FreeSans"
|
||||
font.pointSize: 20
|
||||
color: "blue"
|
||||
focus: true
|
||||
|
@ -112,7 +112,7 @@ QString QDeclarativeTextEdit::text() const
|
|||
|
||||
Sets the family name of the font.
|
||||
|
||||
The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]".
|
||||
The family name is case insensitive and may optionally include a foundry name, e.g. "FreeSans [GNU]".
|
||||
If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen.
|
||||
If the family isn't available a family will be set using the font matching algorithm.
|
||||
*/
|
||||
|
|
|
@ -92,7 +92,7 @@ void QDeclarativeTextInput::setText(const QString &s)
|
|||
|
||||
Sets the family name of the font.
|
||||
|
||||
The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]".
|
||||
The family name is case insensitive and may optionally include a foundry name, e.g. "FreeSans [GNU]".
|
||||
If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen.
|
||||
If the family isn't available a family will be set using the font matching algorithm.
|
||||
*/
|
||||
|
|
|
@ -1793,7 +1793,7 @@ bool QDeclarativeCompiler::buildAttachedProperty(QDeclarativeParser::Property *p
|
|||
// Build "grouped" properties. In this example:
|
||||
// Text {
|
||||
// font.pointSize: 12
|
||||
// font.family: "Helvetica"
|
||||
// font.family: "FreeSans"
|
||||
// }
|
||||
// font is a nested property. pointSize and family are not.
|
||||
bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *prop,
|
||||
|
|
|
@ -1255,7 +1255,7 @@ void qt_init(QApplicationPrivate *priv, Display *display,
|
|||
|
||||
QApplicationPrivate::x11_apply_settings();
|
||||
|
||||
// be smart about the size of the default font. most X servers have helvetica
|
||||
// be smart about the size of the default font. most X servers have font
|
||||
// 12 point available at 2 resolutions:
|
||||
// 75dpi (12 pixels) and 100dpi (17 pixels).
|
||||
// At 95 DPI, a 12 point font should be 16 pixels tall - in which case a 17
|
||||
|
|
|
@ -75,7 +75,7 @@ bool QFontDef::exactMatch(const QFontDef &other) const
|
|||
|
||||
To compare the family members, we need to parse the font names
|
||||
and compare the family/foundry strings separately. This allows
|
||||
us to compare e.g. "Helvetica" and "Helvetica [Adobe]" with
|
||||
us to compare e.g. "FreeSans" and "FreeSans [GNU]" with
|
||||
positive results.
|
||||
*/
|
||||
if (pixelSize != -1 && other.pixelSize != -1) {
|
||||
|
@ -304,8 +304,7 @@ void QFontPrivate::resolve(uint mask, const QFontPrivate *other)
|
|||
\snippet doc/src/snippets/code/src_gui_text_qfont.cpp 2
|
||||
|
||||
You can specify the foundry you want in the family name. The font f
|
||||
in the above example will be set to "Helvetica
|
||||
[Cronyx]".
|
||||
in the above example will be set to "FreeSans [GNU]".
|
||||
|
||||
To determine the attributes of the font actually used in the window
|
||||
system, use a QFontInfo object, e.g.
|
||||
|
@ -442,11 +441,10 @@ QFont::QFont()
|
|||
12 points, except on Symbian where it is 7 points.
|
||||
|
||||
The \a family name may optionally also include a foundry name,
|
||||
e.g. "Helvetica [Cronyx]". If the \a family is
|
||||
available from more than one foundry and the foundry isn't
|
||||
specified, an arbitrary foundry is chosen. If the family isn't
|
||||
available a family will be set using the \l{QFont}{font matching}
|
||||
algorithm.
|
||||
e.g. "FreeSans [GNU]". If the \a family is available from more
|
||||
than one foundry and the foundry isn't specified, an arbitrary
|
||||
foundry is chosen. If the family isn't available a family will
|
||||
be set using the \l{QFont}{font matching} algorithm.
|
||||
|
||||
\sa Weight, setFamily(), setPointSize(), setWeight(), setItalic(),
|
||||
QApplication::font()
|
||||
|
@ -517,11 +515,10 @@ QString QFont::family() const
|
|||
may include a foundry name.
|
||||
|
||||
The \a family name may optionally also include a foundry name,
|
||||
e.g. "Helvetica [Cronyx]". If the \a family is
|
||||
available from more than one foundry and the foundry isn't
|
||||
specified, an arbitrary foundry is chosen. If the family isn't
|
||||
available a family will be set using the \l{QFont}{font matching}
|
||||
algorithm.
|
||||
e.g. "FreeSans [GNU]". If the \a family is available from more
|
||||
than one foundry and the foundry isn't specified, an arbitrary
|
||||
foundry is chosen. If the family isn't available a family will be
|
||||
set using the \l{QFont}{font matching} algorithm.
|
||||
|
||||
\sa family(), QFontInfo
|
||||
*/
|
||||
|
|
|
@ -88,7 +88,7 @@ FT_Face QFont::freetypeFace() const
|
|||
|
||||
QString QFont::lastResortFamily()
|
||||
{
|
||||
return QString::fromLatin1("Helvetica");
|
||||
return QString::fromLatin1("FreeSans");
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -241,11 +241,10 @@ QString QFontDatabase::styleString(const QFontInfo &fontInfo)
|
|||
If the font family is available from two or more foundries the
|
||||
foundry name is included in the family name; for example:
|
||||
"Helvetica [Adobe]" and "Helvetica [Cronyx]". When you specify a
|
||||
family, you can either use the old hyphenated "foundry-family"
|
||||
format or the bracketed "family [foundry]" format; for example:
|
||||
"Cronyx-Helvetica" or "Helvetica [Cronyx]". If the family has a
|
||||
foundry it is always returned using the bracketed format, as is
|
||||
the case with the value returned by families().
|
||||
family, you can either use "family [foundry]" format; for example:
|
||||
"Helvetica [Cronyx]". If the family has a foundry it is always
|
||||
returned using the bracketed format, as is the case with the
|
||||
value returned by families().
|
||||
|
||||
The font() function returns a QFont given a family, style and
|
||||
point size.
|
||||
|
|
|
@ -1521,11 +1521,11 @@ static QByteArray charString(const QPainterPath &path, qreal advance, qreal lsb,
|
|||
return charstring;
|
||||
}
|
||||
|
||||
static const char *helvetica_styles[4] = {
|
||||
"Helvetica",
|
||||
"Helvetica-Bold",
|
||||
"Helvetica-Oblique",
|
||||
"Helvetica-BoldOblique"
|
||||
static const char *freefont_styles[4] = {
|
||||
"FreeSans",
|
||||
"FreeSans-Bold",
|
||||
"FreeSans-Oblique",
|
||||
"FreeSans-BoldOblique"
|
||||
};
|
||||
|
||||
QByteArray QFontSubset::toType1() const
|
||||
|
@ -1548,8 +1548,8 @@ QByteArray QFontSubset::toType1() const
|
|||
style += 2;
|
||||
if (fontEngine->fontDef.weight >= QFont::Bold)
|
||||
style++;
|
||||
if (fontEngine->fontDef.family.contains(QLatin1String("Helvetica"))) {
|
||||
psname = helvetica_styles[style];
|
||||
if (fontEngine->fontDef.family.contains(QLatin1String("FreeSans"))) {
|
||||
psname = freefont_styles[style];
|
||||
standard_font = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ void QFontComboBoxPrivate::_q_currentChanged(const QString &text)
|
|||
\ingroup basicwidgets
|
||||
|
||||
The combobox is populated with an alphabetized list of font
|
||||
family names, such as Arial, Helvetica, and Times New Roman.
|
||||
family names, such as FreeMono, FreeSans and FreeSerif.
|
||||
Family names are displayed using the actual font when possible.
|
||||
For fonts such as Symbol, where the name is not representable in
|
||||
the font itself, a sample of the font is displayed next to the
|
||||
|
|
|
@ -166,8 +166,8 @@ void tst_QFontMetrics::elidedText_data()
|
|||
QTest::addColumn<QFont>("font");
|
||||
QTest::addColumn<QString>("text");
|
||||
|
||||
QTest::newRow("helvetica hello") << QFont("helvetica",10) << QString("hello") ;
|
||||
QTest::newRow("helvetica hello &Bye") << QFont("helvetica",10) << QString("hello&Bye") ;
|
||||
QTest::newRow("freesans hello") << QFont("freesans",10) << QString("hello") ;
|
||||
QTest::newRow("freesans hello &Bye") << QFont("freesans",10) << QString("hello&Bye") ;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue