[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/generic

2014-03-12 Thread Caolán McNamara
 vcl/generic/fontmanager/fontconfig.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit b3a3b78d22f1b2bb3c3debe21d75c6b491858f83
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Mar 12 15:56:15 2014 +

Resolves: fdo#50855 Nimbus Sans L missing styles

Change-Id: Ie8cdcf4ad0ffe52024fd5cfe33073abfc6aadca8
(cherry picked from commit 1e539dbf0fe3894bbf6bf1a0851163b56e37f090)
Reviewed-on: https://gerrit.libreoffice.org/8556
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/vcl/generic/fontmanager/fontconfig.cxx 
b/vcl/generic/fontmanager/fontconfig.cxx
index e88745c..15db140 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -529,6 +529,7 @@ void PrintFontManager::countFontconfigFonts( 
boost::unordered_mapOString, int,
 FcChar8* format = NULL;
 int slant = 0;
 int weight = 0;
+int width = 0;
 int spacing = 0;
 int nCollectionEntry = -1;
 FcBool outline = false;
@@ -538,6 +539,7 @@ void PrintFontManager::countFontconfigFonts( 
boost::unordered_mapOString, int,
 FcResult eStyleRes= rWrapper.LocalizedElementFromPattern( 
pFSet-fonts[i], style, FC_STYLE, FC_STYLELANG );
 FcResult eSlantRes= FcPatternGetInteger(pFSet-fonts[i], 
FC_SLANT, 0, slant);
 FcResult eWeightRes   = FcPatternGetInteger(pFSet-fonts[i], 
FC_WEIGHT, 0, weight);
+FcResult eWidthRes= FcPatternGetInteger(pFSet-fonts[i], 
FC_WIDTH, 0, width);
 FcResult eSpacRes = FcPatternGetInteger(pFSet-fonts[i], 
FC_SPACING, 0, spacing);
 FcResult eOutRes  = FcPatternGetBool(pFSet-fonts[i], 
FC_OUTLINE, 0, outline);
 FcResult eIndexRes= FcPatternGetInteger(pFSet-fonts[i], 
FC_INDEX, 0, nCollectionEntry);
@@ -549,11 +551,12 @@ void PrintFontManager::countFontconfigFonts( 
boost::unordered_mapOString, int,
 #if (OSL_DEBUG_LEVEL  2)
 fprintf( stderr, found font \%s\ in file %s\n
 weight = %d, slant = %d, style = \%s\\n
-spacing = %d, outline = %d, format %s\n
+width = %d, spacing = %d, outline = %d, format %s\n
  , family, file
  , eWeightRes == FcResultMatch ? weight : -1
  , eSpacRes == FcResultMatch ? slant : -1
  , eStyleRes == FcResultMatch ? (const char*) style : 
nil
+ , eWeightRes == FcResultMatch ? width : -1
  , eSpacRes == FcResultMatch ? spacing : -1
  , eOutRes == FcResultMatch ? outline : -1
  , eFormatRes == FcResultMatch ? (const char*)format : 
unknown
@@ -655,6 +658,8 @@ void PrintFontManager::countFontconfigFonts( 
boost::unordered_mapOString, int,
 }
 if( eWeightRes == FcResultMatch )
 pUpdate-m_eWeight = convertWeight(weight);
+if( eWidthRes == FcResultMatch )
+pUpdate-m_eWidth = convertWidth(width);
 if( eSpacRes == FcResultMatch )
 pUpdate-m_ePitch = convertSpacing(spacing);
 if( eSlantRes == FcResultMatch )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/generic

2014-01-04 Thread Michael Meeks
 vcl/generic/glyphs/glyphcache.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 227fb8c9c3b22798b90aff9b17605428b7f9a897
Author: Michael Meeks michael.me...@collabora.com
Date:   Sat Jan 4 14:47:20 2014 +

fdo#73280 - always advance the iterator to avoid an infinite loop.

Change-Id: I62f2d8ec5d6d62f1dbe9657cfbbbc90c56cce812

diff --git a/vcl/generic/glyphs/glyphcache.cxx 
b/vcl/generic/glyphs/glyphcache.cxx
index 2cda76f..5ac5510 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -374,6 +374,8 @@ void ServerFont::GarbageCollect( long nMinLruIndex )
 GlyphCache::GetInstance().RemovingGlyph( rGD );
 it = maGlyphList.erase( it );
 }
+else
+++it;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/generic

2013-11-22 Thread Khaled Hosny
 vcl/generic/print/glyphset.cxx |   12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 29e5d00bba1bd4a547b36f111e2e7922922f8fb7
Author: Khaled Hosny khaledho...@eglug.org
Date:   Thu Nov 21 22:59:06 2013 +0200

fdo#67802: Fix PS printing of non-CTL text with ligatures

The GlyphSet::AddGlyphID() was messing with glyphs of characters that
can be converted to Windows-1252 encoding, discarding whatever glyph it
was asked to use and using a random glyph that is supposed to belong to
the converted character. For ligatures this means the ligature glyphs
was discarded and the glyphs for its component was used, but this broken
for just any glyph substitution.

The code makes no sense at all, apart from the fact that it is verbatim
copy of GlyphSet::AddCharID() since 9754ad8d979557ea03cbfe04708b62b698d1276c
and just happened to work because we did not enable ligatures and other
typographic features for non-CTL text before.

Change-Id: I764f0b40f8acf61eae38a9038b0666d711c04a9d

diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index 94730be..b2e982e 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -275,16 +275,14 @@ GlyphSet::AddGlyphID (
  sal_Int32* nOutGlyphSetID
  )
 {
-sal_uChar nMappedChar;
+sal_uChar nMappedChar = 0;
 
 // XXX important: avoid to reencode type1 symbol fonts
 if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL)
 nMappedChar = GetSymbolMapping (nUnicode);
-else
-nMappedChar = GetAnsiMapping (nUnicode);
 
-// create an empty glyphmap that is reserved for iso1252 encoded glyphs
-// (or -- unencoded -- symbol glyphs) and a second map that takes any other
+// create an empty glyphmap that is reserved for unencoded symbol glyphs,
+// and a second map that takes any other
 if (maGlyphList.empty())
 {
 glyph_map_t aMap, aMapp;
@@ -302,7 +300,7 @@ GlyphSet::AddGlyphID (
 // insert a new glyph in the font subset
 if (nMappedChar)
 {
-// always put iso1252 chars into the first map, map them on itself
+// always put symbol glyphs into the first map, map them on itself
 glyph_map_t aGlyphSet = maGlyphList.front();
 AddNotdef (aGlyphSet);
 
@@ -312,7 +310,7 @@ GlyphSet::AddGlyphID (
 }
 else
 {
-// other chars are just appended to the list
+// other glyphs are just appended to the list
 glyph_map_t aGlyphSet = maGlyphList.back();
 AddNotdef (aGlyphSet);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits