Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1eb8e3918 | ||
|
|
0b5af7a1b3 | ||
|
|
3f1c635507 | ||
|
|
0073df7db8 | ||
|
|
64d59e2ec1 |
3 changed files with 28 additions and 123 deletions
|
|
@ -48,17 +48,17 @@
|
|||
+ export PKG_CONFIG_SYSROOT_DIR
|
||||
fi
|
||||
|
||||
+prefix=`%PKG_CONFIG% --variable prefix freetype2`
|
||||
+exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
|
||||
+prefix=`pkgconf --variable prefix freetype2`
|
||||
+exec_prefix=`pkgconf --variable exec_prefix freetype2`
|
||||
+
|
||||
+includedir=`%PKG_CONFIG% --variable includedir freetype2`
|
||||
+libdir=`%PKG_CONFIG% --variable libdir freetype2`
|
||||
+includedir=`pkgconf --variable includedir freetype2`
|
||||
+libdir=`pkgconf --variable libdir freetype2`
|
||||
+
|
||||
+version=`%PKG_CONFIG% --modversion freetype2`
|
||||
+version=`pkgconf --modversion freetype2`
|
||||
+
|
||||
+cflags=`%PKG_CONFIG% --cflags freetype2`
|
||||
+dynamic_libs=`%PKG_CONFIG% --libs freetype2`
|
||||
+static_libs=`%PKG_CONFIG% --static --libs freetype2`
|
||||
+cflags=`pkgconf --cflags freetype2`
|
||||
+dynamic_libs=`pkgconf --libs freetype2`
|
||||
+static_libs=`pkgconf --static --libs freetype2`
|
||||
+
|
||||
orig_prefix=$prefix
|
||||
orig_exec_prefix=$exec_prefix
|
||||
|
|
|
|||
|
|
@ -1,101 +0,0 @@
|
|||
--- a/src/smooth/ftsmooth.c
|
||||
+++ b/src/smooth/ftsmooth.c
|
||||
@@ -232,39 +232,13 @@
|
||||
FT_UInt i, j;
|
||||
|
||||
unsigned int height = bitmap->rows;
|
||||
- unsigned int width = bitmap->width;
|
||||
+ unsigned int width = bitmap->width / 3;
|
||||
int pitch = bitmap->pitch;
|
||||
|
||||
-
|
||||
- /* Render 3 separate monochrome bitmaps, shifting the outline */
|
||||
- /* by 1/3 pixel. */
|
||||
- width /= 3;
|
||||
-
|
||||
- bitmap->buffer += width;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- FT_Outline_Translate( outline, -21, 0 );
|
||||
- x_shift -= 21;
|
||||
- bitmap->buffer += width;
|
||||
-
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
- FT_Outline_Translate( outline, 42, 0 );
|
||||
- x_shift += 42;
|
||||
- bitmap->buffer -= 2 * width;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */
|
||||
- /* XXX: It is more efficient to render every third byte above. */
|
||||
-
|
||||
if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
|
||||
goto Exit;
|
||||
|
||||
@@ -272,11 +246,7 @@
|
||||
{
|
||||
line = bitmap->buffer + i * (FT_ULong)pitch;
|
||||
for ( j = 0; j < width; j++ )
|
||||
- {
|
||||
- temp[3 * j ] = line[j];
|
||||
- temp[3 * j + 1] = line[j + width];
|
||||
- temp[3 * j + 2] = line[j + width + width];
|
||||
- }
|
||||
+ temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j];
|
||||
FT_MEM_COPY( line, temp, pitch );
|
||||
}
|
||||
|
||||
@@ -284,35 +254,23 @@
|
||||
}
|
||||
else if ( vmul ) /* lcd_v */
|
||||
{
|
||||
- int pitch = bitmap->pitch;
|
||||
-
|
||||
+ FT_Byte* line;
|
||||
+ FT_UInt i;
|
||||
+ int original_pitch = bitmap->pitch;
|
||||
|
||||
- /* Render 3 separate monochrome bitmaps, shifting the outline */
|
||||
- /* by 1/3 pixel. Triple the pitch to render on each third row. */
|
||||
bitmap->pitch *= 3;
|
||||
bitmap->rows /= 3;
|
||||
|
||||
- bitmap->buffer += pitch;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
-
|
||||
- FT_Outline_Translate( outline, 0, 21 );
|
||||
- y_shift += 21;
|
||||
- bitmap->buffer += pitch;
|
||||
-
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
- FT_Outline_Translate( outline, 0, -42 );
|
||||
- y_shift -= 42;
|
||||
- bitmap->buffer -= 2 * pitch;
|
||||
-
|
||||
- error = render->raster_render( render->raster, ¶ms );
|
||||
- if ( error )
|
||||
- goto Exit;
|
||||
+ for ( i = 0; i < bitmap->rows; i++ )
|
||||
+ {
|
||||
+ line = bitmap->buffer + i * bitmap->pitch;
|
||||
+ FT_MEM_COPY( line + original_pitch, line, bitmap->width );
|
||||
+ FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width );
|
||||
+ }
|
||||
|
||||
bitmap->pitch /= 3;
|
||||
bitmap->rows *= 3;
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
# Patented subpixel rendering disabled by default.
|
||||
# Pass '--with subpixel_rendering' on rpmbuild command-line to enable.
|
||||
%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
|
||||
|
||||
%{!?with_xfree86:%define with_xfree86 1}
|
||||
|
||||
Summary: A free and portable font rendering engine
|
||||
Name: freetype
|
||||
Version: 2.9.1
|
||||
Release: 2%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.freetype.org
|
||||
|
|
@ -16,8 +12,8 @@ Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{versi
|
|||
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
|
||||
Source3: ftconfig.h
|
||||
|
||||
# Enable subpixel rendering (ClearType)
|
||||
Patch0: freetype-2.3.0-enable-spr.patch
|
||||
|
||||
# Enable otvalid and gxvalid modules
|
||||
Patch1: freetype-2.2.1-enable-valid.patch
|
||||
# Enable additional demos
|
||||
|
|
@ -27,8 +23,6 @@ Patch3: freetype-2.6.5-libtool.patch
|
|||
|
||||
Patch4: freetype-2.8-multilib.patch
|
||||
|
||||
Patch5: freetype-2.9-ftsmooth.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libpng-devel
|
||||
|
|
@ -36,9 +30,8 @@ BuildRequires: zlib-devel
|
|||
BuildRequires: bzip2-devel
|
||||
|
||||
Provides: %{name}-bytecode
|
||||
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
|
||||
Provides: %{name}-subpixel
|
||||
%endif
|
||||
Obsoletes: freetype-freeworld < 2.9.1-2
|
||||
|
||||
%description
|
||||
The FreeType engine is a free and portable font rendering
|
||||
|
|
@ -78,10 +71,7 @@ FreeType.
|
|||
%prep
|
||||
%setup -q -b 1 -a 2
|
||||
|
||||
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
|
||||
%patch0 -p1 -b .enable-spr
|
||||
%endif
|
||||
|
||||
%patch1 -p1 -b .enable-valid
|
||||
|
||||
pushd ft2demos-%{version}
|
||||
|
|
@ -90,7 +80,6 @@ popd
|
|||
|
||||
%patch3 -p1 -b .libtool
|
||||
%patch4 -p1 -b .multilib
|
||||
%patch5 -p1 -b .ftsmooth
|
||||
|
||||
%build
|
||||
|
||||
|
|
@ -203,6 +192,23 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
|
|||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Mon Apr 8 2019 Marek Kasik <mkasik@redhat.com> - 2.9.1-7
|
||||
- Remove freetype-2.9-ftsmooth.patch
|
||||
|
||||
* Wed Oct 31 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-6
|
||||
- Obsolete freetype-freeworld
|
||||
- Resolves: #1644700
|
||||
|
||||
* Wed Oct 31 2018 Neal Gompa <ngompa13@gmail.com> - 2.9.1-5
|
||||
- Correctly enable subpixel rendering for ClearType functionality
|
||||
|
||||
* Mon Oct 29 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-4
|
||||
- Enable ClearType code thanks to Microsoft joining OIN
|
||||
|
||||
* Fri Oct 19 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-3
|
||||
- Use 'pkgconf' directly for multilib reasons
|
||||
- Resolves: #1639379
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue