[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - instsetoo_native/util padmin/source solenv/bin stlport/win32_custom.bat stlport/win32_sdk.bat vcl/aqua vcl/inc vcl/os2 vcl/source vcl/unx vcl/win

Herbert Dürr hdu at apache.org
Mon Dec 16 10:08:43 PST 2013


 instsetoo_native/util/makefile.mk                 |   18 +++++
 padmin/source/salglyphid.hxx                      |   52 ++++++++++++++++
 solenv/bin/make_installer.pl                      |   22 +++++--
 solenv/bin/modules/installer/windows/binary.pm    |   19 +-----
 solenv/bin/modules/installer/windows/idtglobal.pm |   42 ++++++++++---
 stlport/win32_custom.bat                          |   31 ----------
 stlport/win32_sdk.bat                             |   31 ----------
 vcl/aqua/source/gdi/salatslayout.cxx              |   12 +--
 vcl/aqua/source/gdi/salgdi.cxx                    |   34 +++++------
 vcl/inc/aqua/salgdi.h                             |    6 -
 vcl/inc/fontsubset.hxx                            |    5 -
 vcl/inc/glyphcache.hxx                            |   20 +++---
 vcl/inc/graphite_layout.hxx                       |    6 -
 vcl/inc/os2/salgdi.h                              |    6 -
 vcl/inc/salgdi.hxx                                |    7 +-
 vcl/inc/salglyphid.hxx                            |   49 +++++++++++++++
 vcl/inc/sallayout.hxx                             |   29 +--------
 vcl/inc/unx/pspgraphics.h                         |    6 -
 vcl/inc/unx/salgdi.h                              |    6 -
 vcl/inc/vcl/fontmanager.hxx                       |    3 
 vcl/inc/win/salgdi.h                              |    6 -
 vcl/os2/source/gdi/os2layout.cxx                  |   20 +++---
 vcl/os2/source/gdi/salgdi3.cxx                    |   52 ++++++++--------
 vcl/source/fontsubset/cff.cxx                     |   20 +++---
 vcl/source/fontsubset/fontsubset.cxx              |    2 
 vcl/source/gdi/outdev3.cxx                        |   14 ++--
 vcl/source/gdi/pdfwriter_impl.cxx                 |   30 ++++-----
 vcl/source/gdi/sallayout.cxx                      |   24 +++----
 vcl/source/glyphs/gcach_ftyp.cxx                  |   68 +++++++++++-----------
 vcl/source/glyphs/gcach_ftyp.hxx                  |   14 ++--
 vcl/source/glyphs/gcach_layout.cxx                |   18 ++---
 vcl/source/glyphs/glyphcache.cxx                  |   18 ++---
 vcl/source/glyphs/graphite_layout.cxx             |   24 +++----
 vcl/unx/generic/fontmanager/fontmanager.cxx       |   16 ++---
 vcl/unx/generic/gdi/gcach_xpeer.cxx               |   55 ++++++++---------
 vcl/unx/generic/gdi/gcach_xpeer.hxx               |   11 +--
 vcl/unx/generic/gdi/pspgraphics.cxx               |   64 ++++++++++----------
 vcl/unx/generic/gdi/salgdi3.cxx                   |   36 +++++------
 vcl/unx/generic/gdi/xrender_peer.hxx              |   20 +++---
 vcl/unx/generic/printergfx/glyphset.cxx           |   10 +--
 vcl/unx/generic/printergfx/glyphset.hxx           |   10 +--
 vcl/unx/generic/printergfx/text_gfx.cxx           |    4 -
 vcl/unx/headless/svpgdi.hxx                       |    6 -
 vcl/unx/headless/svppspgraphics.cxx               |   48 +++++++--------
 vcl/unx/headless/svppspgraphics.hxx               |    6 -
 vcl/unx/headless/svptext.cxx                      |   60 +++++++++----------
 vcl/win/source/gdi/salgdi3.cxx                    |   62 ++++++++++----------
 vcl/win/source/gdi/winlayout.cxx                  |   20 +++---
 48 files changed, 597 insertions(+), 545 deletions(-)

New commits:
commit 70557310027f12ac362fed5376578c1e577ff4d9
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Dec 16 16:59:30 2013 +0000

    #i122362# remove windows scripts for importing stlport4 headers

diff --git a/stlport/win32_custom.bat b/stlport/win32_custom.bat
deleted file mode 100644
index 7aee78c..0000000
--- a/stlport/win32_custom.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-rem *************************************************************
-rem  
-rem  Licensed to the Apache Software Foundation (ASF) under one
-rem  or more contributor license agreements.  See the NOTICE file
-rem  distributed with this work for additional information
-rem  regarding copyright ownership.  The ASF licenses this file
-rem  to you under the Apache License, Version 2.0 (the
-rem  "License"); you may not use this file except in compliance
-rem  with the License.  You may obtain a copy of the License at
-rem  
-rem    http://www.apache.org/licenses/LICENSE-2.0
-rem  
-rem  Unless required by applicable law or agreed to in writing,
-rem  software distributed under the License is distributed on an
-rem  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem  KIND, either express or implied.  See the License for the
-rem  specific language governing permissions and limitations
-rem  under the License.
-rem  
-rem *************************************************************
-rem parameters in order of their apearance:
-rem - path to unpacked tarball
-rem - relative path back to module root
-
-setlocal
-
-cd %1
-
-rem type %2\dos_lineends.patch | patch -b -p2
-patch -i %2\dos_lineends.patch -b -p2
-
diff --git a/stlport/win32_sdk.bat b/stlport/win32_sdk.bat
deleted file mode 100755
index 87dc9e7..0000000
--- a/stlport/win32_sdk.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-rem *************************************************************
-rem  
-rem  Licensed to the Apache Software Foundation (ASF) under one
-rem  or more contributor license agreements.  See the NOTICE file
-rem  distributed with this work for additional information
-rem  regarding copyright ownership.  The ASF licenses this file
-rem  to you under the Apache License, Version 2.0 (the
-rem  "License"); you may not use this file except in compliance
-rem  with the License.  You may obtain a copy of the License at
-rem  
-rem    http://www.apache.org/licenses/LICENSE-2.0
-rem  
-rem  Unless required by applicable law or agreed to in writing,
-rem  software distributed under the License is distributed on an
-rem  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem  KIND, either express or implied.  See the License for the
-rem  specific language governing permissions and limitations
-rem  under the License.
-rem  
-rem *************************************************************
-rem parameters in order of their apearance:
-rem - path to unpacked tarball
-rem - relative path back to module root
-
-setlocal
-
-cd %1
-
-rem type %2\dos_lineends.patch | patch -b -p2
-patch -i %2\STLport-4.0_SDK.patch -b -p2
-
commit a5e2f13046bcfa5704406668d3731ad7c5ff48e4
Author: Andre Fischer <af at apache.org>
Date:   Mon Dec 16 16:14:34 2013 +0000

    123531: Copy all binary files that are required for language packs. Cleanup.

diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index 3a9e3f5..27b5bc3 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -443,7 +443,23 @@ MSI_LANGPACK_TEMPLATE_FILES=		\
     components.txt			\
     ooo_patchcodes.txt		\
     ooodev_patchcodes.txt		\
-    Binary/Banner.bmp
+    Binary/Banner.bmp		\
+    Binary/Image.bmp		\
+    Binary/caution.ico		\
+    Binary/dontinstall.ico		\
+    Binary/install.ico		\
+    Binary/installfirstuse.ico	\
+    Binary/installpartial.ico	\
+    Binary/installstatemenu.ico	\
+    Binary/networkinstall.ico	\
+    Binary/newfolder.ico		\
+    Binary/openfolder.ico		\
+    Binary/setup.ico		\
+    Binary/setupcomplete.ico	\
+    Binary/setuppartial.ico		\
+    Binary/setuprepair.ico		\
+    Binary/trashcan.ico		\
+    Binary/up.ico
 
 MSI_SDK_TEMPLATE_FILES=			\
     ActionTe.idt			\
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index f73c0b6..6731bd0 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -213,11 +213,15 @@ sub MakeWindowsBuild ($$$$$$$$$$$$$$$$$$$$)
     installer::systemactions::create_directory($newidtdir);
 
     # Collecting all files with flag "BINARYTABLE"
-    my $binarytablefiles = installer::worker::collect_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE");
+    my $binarytablefiles = installer::worker::collect_all_items_with_special_flag(
+        $filesinproductlanguageresolvedarrayref,
+        "BINARYTABLE");
 
     # Removing all files with flag "BINARYTABLE_ONLY"
     @installer::globals::binarytableonlyfiles = ();
-    $filesinproductlanguageresolvedarrayref = installer::worker::remove_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE_ONLY");
+    $filesinproductlanguageresolvedarrayref = installer::worker::remove_all_items_with_special_flag(
+        $filesinproductlanguageresolvedarrayref,
+        "BINARYTABLE_ONLY");
 
     # Collecting all profileitems with flag "INIFILETABLE" for table "IniFile"
     my $inifiletableentries = installer::worker::collect_all_items_with_special_flag($profileitemsinproductlanguageresolvedarrayref ,"INIFILETABLE");
@@ -400,7 +404,14 @@ sub MakeWindowsBuild ($$$$$$$$$$$$$$$$$$$$)
 
         installer::logger::include_header_into_logfile("Copying idt files to $languageidtdir:");
 
-        installer::windows::idtglobal::prepare_language_idt_directory($languageidtdir, $newidtdir, $onelanguage, $filesinproductlanguageresolvedarrayref, \@iconfilecollector, $binarytablefiles, $allvariableshashref);
+        installer::windows::idtglobal::prepare_language_idt_directory(
+            $languageidtdir,
+            $newidtdir,
+            $onelanguage,
+            $filesinproductlanguageresolvedarrayref,
+            \@iconfilecollector,
+            $binarytablefiles,
+            $allvariableshashref);
 
         if (( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'NOLANGUAGESELECTIONPRODUCT'} ))
         {
@@ -513,7 +524,10 @@ sub MakeWindowsBuild ($$$$$$$$$$$$$$$$$$$$)
         installer::windows::property::update_checkbox_table($languageidtdir, $allvariableshashref);
 
         # adding the files from the binary directory into the binary table
-        installer::windows::binary::update_binary_table($languageidtdir, $filesinproductlanguageresolvedarrayref, $binarytablefiles);
+        installer::windows::binary::update_binary_table(
+            $languageidtdir,
+            $filesinproductlanguageresolvedarrayref,
+            $binarytablefiles);
 
         # setting patch codes to detect installed products
 
diff --git a/solenv/bin/modules/installer/windows/binary.pm b/solenv/bin/modules/installer/windows/binary.pm
index 0f4d558..65a7054 100644
--- a/solenv/bin/modules/installer/windows/binary.pm
+++ b/solenv/bin/modules/installer/windows/binary.pm
@@ -19,14 +19,14 @@
 #
 #**************************************************************
 
-
-
 package installer::windows::binary;
 
 use installer::existence;
 use installer::files;
 use installer::globals;
 
+use strict;
+
 ###########################################################################################################
 # Updating the table Binary dynamically with all files from $binarytablefiles
 # Content:
@@ -45,22 +45,15 @@ sub update_binary_table
     # Only the iconfiles, that are used in the shortcut table for the
     # FolderItems (entries in Windows startmenu) are added into the icon table.
 
-    for ( my $i = 0; $i <= $#{$binarytablefiles}; $i++ )
+    foreach my $binaryfile (@$binarytablefiles)
     {
-        my $binaryfile = ${$binarytablefiles}[$i];
         my $binaryfilename = $binaryfile->{'Name'};
         my $binaryfiledata = $binaryfilename;
 
-        $binaryfilename =~ s/\.//g;  # removing "." in filename: "abc.dll" to "abcdll" in name column
-
-        my %binary = ();
-
-        $binary{'Name'} = $binaryfilename;
-        $binary{'Data'} = $binaryfiledata;
-
-        my $oneline = $binary{'Name'} . "\t" . $binary{'Data'} . "\n";
+        # removing "." in filename: "abc.dll" to "abcdll" in name column
+        $binaryfilename =~ s/\.//g;
 
-        push(@{$binaryidttable}, $oneline);
+        push @$binaryidttable, $binaryfilename . "\t" . $binaryfiledata . "\n";
     }
 
     # Saving the file
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index 570338e..8caffaf 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -779,7 +779,7 @@ sub translate_idtfile
 # into one language specific directory
 ##############################################################
 
-sub prepare_language_idt_directory
+sub prepare_language_idt_directory ($$$$$$$)
 {
     my ($destinationdir, $newidtdir, $onelanguage, $filesref, $iconfilecollector, $binarytablefiles, $allvariables) = @_;
 
@@ -794,13 +794,21 @@ sub prepare_language_idt_directory
     if ( -d $installer::globals::idttemplatepath . $installer::globals::separator . "Binary")
     {
         installer::systemactions::create_directory($destinationdir . $installer::globals::separator . "Binary");
-        installer::systemactions::copy_directory($installer::globals::idttemplatepath . $installer::globals::separator . "Binary", $destinationdir . $installer::globals::separator . "Binary");
+        installer::systemactions::copy_directory(
+            $installer::globals::idttemplatepath . $installer::globals::separator . "Binary",
+            $destinationdir . $installer::globals::separator . "Binary");
 
         if ((( $installer::globals::patch ) && ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )) || ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ))
         {
             my $bitmapdir = "";
-            if ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'}; }
-            if ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} ) { $bitmapdir = $allvariables->{'WINDOWSBITMAPDIRECTORY'}; }
+            if ( $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'} )
+            {
+                $bitmapdir = $allvariables->{'WINDOWSPATCHBITMAPDIRECTORY'};
+            }
+            if ( $allvariables->{'WINDOWSBITMAPDIRECTORY'} )
+            {
+                $bitmapdir = $allvariables->{'WINDOWSBITMAPDIRECTORY'};
+            }
 
             my $newsourcedir = $installer::globals::unpackpath . $installer::globals::separator . $bitmapdir; # path setting in list file dependent from unpackpath !?
             $installer::logger::Lang->printf("\n");
@@ -812,9 +820,13 @@ sub prepare_language_idt_directory
             if ( ! -d $newsourcedir )
             {
                 my $currentdir = cwd();
-                installer::exiter::exit_program("ERROR: Directory $newsourcedir does not exist! Current directory is: $currentdir", "prepare_language_idt_directory");
+                installer::exiter::exit_program(
+                    "ERROR: Directory $newsourcedir does not exist! Current directory is: $currentdir",
+                    "prepare_language_idt_directory");
             }
-            installer::systemactions::copy_directory($newsourcedir, $destinationdir . $installer::globals::separator . "Binary");
+            installer::systemactions::copy_directory(
+                $newsourcedir,
+                $destinationdir . $installer::globals::separator . "Binary");
         }
     }
 
@@ -822,7 +834,9 @@ sub prepare_language_idt_directory
 
     if ( -d $installer::globals::idttemplatepath . $installer::globals::separator . "Icon")
     {
-        installer::systemactions::copy_directory($installer::globals::idttemplatepath . $installer::globals::separator . "Icon", $destinationdir . $installer::globals::separator . "Icon");
+        installer::systemactions::copy_directory(
+            $installer::globals::idttemplatepath . $installer::globals::separator . "Icon",
+            $destinationdir . $installer::globals::separator . "Icon");
     }
 
     # Copying all files in $iconfilecollector, that describe icons of folderitems
@@ -831,18 +845,24 @@ sub prepare_language_idt_directory
     {
         my $iconfilename = ${$iconfilecollector}[$i];
         installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$iconfilename);
-        installer::systemactions::copy_one_file(${$iconfilecollector}[$i], $destinationdir . $installer::globals::separator . "Icon" . $installer::globals::separator . $iconfilename);
+        installer::systemactions::copy_one_file(
+            ${$iconfilecollector}[$i],
+            $destinationdir . $installer::globals::separator . "Icon" . $installer::globals::separator . $iconfilename);
     }
 
     # Copying all files in $binarytablefiles in the binary directory
 
-    for ( my $i = 0; $i <= $#{$binarytablefiles}; $i++ )
+    foreach my $binaryfile (@$binarytablefiles)
     {
-        my $binaryfile = ${$binarytablefiles}[$i];
         my $binaryfilepath = $binaryfile->{'sourcepath'};
         my $binaryfilename = $binaryfilepath;
+        $installer::logger::Lang->printf("copying binary file %s to %s\n",
+            $binaryfilepath,
+            $binaryfilename);
         installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$binaryfilename);
-        installer::systemactions::copy_one_file($binaryfilepath, $destinationdir . $installer::globals::separator . "Binary" . $installer::globals::separator . $binaryfilename);
+        installer::systemactions::copy_one_file(
+            $binaryfilepath,
+            $destinationdir . $installer::globals::separator . "Binary" . $installer::globals::separator . $binaryfilename);
     }
 
     # Copying all new created and language independent idt-files to the destination $destinationdir.
commit c0a84ad10964fb7a65b6239cbe1cef8698b5d17b
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Dec 16 16:07:41 2013 +0000

    #i123840# add and use the sal_GlyphId type
    
    Using the central definition adds consistency and cleans up many ad hoc
    declarations. The type sal_GlyphId will become a class in the future so
    that its bitfield operations etc. can then be isolated into nice methods.

diff --git a/padmin/source/salglyphid.hxx b/padmin/source/salglyphid.hxx
new file mode 100644
index 0000000..c7dc594
--- /dev/null
+++ b/padmin/source/salglyphid.hxx
@@ -0,0 +1,52 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// This header file is a verbatim copy of its counterpart in vcl.
+// With spadmin being on its way out (#i123863i#) a cleaner solution isn't worth the effort
+
+#ifndef _SV_SALGLYPHID_HXX
+#define _SV_SALGLYPHID_HXX
+
+// TODO: sal_GlyphId should become a class...
+typedef sal_uInt32 sal_GlyphId;
+
+// Glyph Flags
+#define GF_NONE     0x00000000
+#define GF_FLAGMASK 0xFF800000
+#define GF_IDXMASK  ~GF_FLAGMASK
+#define GF_ISCHAR   0x00800000
+#define GF_ROTL     0x01000000
+// caution !!!
+#define GF_VERT     0x02000000
+// GF_VERT is only for windows implementation
+// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx)
+// don't use this elsewhere !!!
+#define GF_ROTR     0x03000000
+#define GF_ROTMASK  0x03000000
+#define GF_UNHINTED 0x04000000
+#define GF_GSUB     0x08000000
+#define GF_FONTMASK 0xF0000000
+#define GF_FONTSHIFT 28
+
+#define GF_DROPPED  0xFFFFFFFF
+
+#endif // _SV_SALGLYPHID_HXX
+
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx
index eb0cfaa..3a8358a 100644
--- a/vcl/aqua/source/gdi/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/salatslayout.cxx
@@ -480,7 +480,7 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
  *
  * @return : number of glyph details that were provided
 **/
-int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int& nStart,
+int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, int& nStart,
     sal_Int32* pGlyphAdvances, int* pCharIndexes ) const
 {
     if( nStart < 0 )                // first glyph requested?
@@ -539,7 +539,7 @@ int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int
     while( nCount < nLen )
     {
         ++nCount;
-        sal_GlyphId nGlyphId = mpGlyphIds[nStart];
+        sal_GlyphId aGlyphId = mpGlyphIds[ nStart];
 
            // check if glyph fallback is needed for this glyph
         // TODO: use ATSUDirectGetLayoutDataArrayPtrFromTextLayout(kATSUDirectDataStyleIndex) API instead?
@@ -557,11 +557,11 @@ int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIDs, Point& rPos, int
             // register fallback font
             const int nLevel = mpFallbackInfo->AddFallback( nFallbackFontID );
                // update sal_GlyphId with fallback level
-            nGlyphId |= (nLevel << GF_FONTSHIFT);
+            aGlyphId |= (nLevel << GF_FONTSHIFT);
         }
 
         // update resulting glyphid array
-        *(pGlyphIDs++) = nGlyphId;
+        *(pOutGlyphIds++) = aGlyphId;
 
         // update returned glyph advance array
         if( pGlyphAdvances )
@@ -1209,13 +1209,13 @@ void ATSLayout::Simplify( bool /*bIsBase*/ ) {}
 
 // get the ImplFontData for a glyph fallback font
 // for a glyphid that was returned by ATSLayout::GetNextGlyphs()
-const ImplFontData* ATSLayout::GetFallbackFontData( sal_GlyphId nGlyphId ) const
+const ImplFontData* ATSLayout::GetFallbackFontData( sal_GlyphId aGlyphId ) const
 {
     // check if any fallback fonts were needed
     if( !mpFallbackInfo )
         return NULL;
     // check if the current glyph needs a fallback font
-    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
+    int nFallbackLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
     if( !nFallbackLevel )
         return NULL;
     return mpFallbackInfo->GetFallbackFontData( nFallbackLevel );
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index abc74a5..a45ae9f 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -1852,7 +1852,7 @@ static OSStatus GgoMoveToProc( const Float32Point* pPoint, void* pData )
     return eStatus;
 }
 
-sal_Bool AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
+bool AquaSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon& rPolyPoly )
 {
     GgoData aGgoData;
     aGgoData.mpPolyPoly = &rPolyPoly;
@@ -1860,7 +1860,7 @@ sal_Bool AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygo
 
     ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback when CWS pdffix02 is integrated
     OSStatus eGgoStatus = noErr;
-    OSStatus eStatus = ATSUGlyphGetCubicPaths( rATSUStyle, nGlyphId,
+    OSStatus eStatus = ATSUGlyphGetCubicPaths( rATSUStyle, aGlyphId,
         GgoMoveToProc, GgoLineToProc, GgoCurveToProc, GgoClosePathProc,
         &aGgoData, &eGgoStatus );
     if( (eStatus != noErr) ) // TODO: why is (eGgoStatus!=noErr) when curves are involved?
@@ -1894,13 +1894,13 @@ long AquaSalGraphics::GetGraphicsWidth() const
 
 // -----------------------------------------------------------------------
 
-sal_Bool AquaSalGraphics::GetGlyphBoundRect( long nGlyphId, Rectangle& rRect )
+bool AquaSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
 {
     ATSUStyle rATSUStyle = maATSUStyle; // TODO: handle glyph fallback
-    GlyphID aGlyphId = nGlyphId;
     ATSGlyphScreenMetrics aGlyphMetrics;
+    GlyphID nAtsGlyphId = aGlyphId;
     OSStatus eStatus = ATSUGlyphGetScreenMetrics( rATSUStyle,
-        1, &aGlyphId, 0, FALSE, !mbNonAntialiasedText, &aGlyphMetrics );
+        1, &nAtsGlyphId, 0, FALSE, !mbNonAntialiasedText, &aGlyphMetrics );
     if( eStatus != noErr )
         return false;
 
@@ -2248,7 +2248,7 @@ static bool GetRawFontData( const ImplFontData* pFontData,
 }
 
 sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
-    const ImplFontData* pFontData, long* pGlyphIDs, sal_uInt8* pEncoding,
+    const ImplFontData* pFontData, sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding,
     sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
 {
     // TODO: move more of the functionality here into the generic subsetter code
@@ -2278,7 +2278,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
         // make the subsetter provide the requested subset
         FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" );
         bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
-            pGlyphIDs, pEncoding, nGlyphCount, pGlyphWidths );
+            pGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
         fclose( pOutFile );
         return bRC;
     }
@@ -2324,21 +2324,21 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
     for( int i = 0; i < nGlyphCount; ++i )
     {
         aTempEncs[i] = pEncoding[i];
-        sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-        if( pGlyphIDs[i] & GF_ISCHAR )
+        sal_GlyphId aGlyphId( pGlyphIds[i] & GF_IDXMASK);
+        if( pGlyphIds[i] & GF_ISCHAR )
         {
-            bool bVertical = (pGlyphIDs[i] & GF_ROTMASK) != 0;
-            nGlyphIdx = ::MapChar( pSftFont, static_cast<sal_uInt16>(nGlyphIdx), bVertical );
-            if( nGlyphIdx == 0 && pFontData->IsSymbolFont() )
+            bool bVertical = (pGlyphIds[i] & GF_ROTMASK) != 0;
+            aGlyphId = ::MapChar( pSftFont, static_cast<sal_uInt16>(aGlyphId), bVertical );
+            if( aGlyphId == 0 && pFontData->IsSymbolFont() )
             {
                 // #i12824# emulate symbol aliasing U+FXXX <-> U+0XXX
-                nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-                nGlyphIdx = (nGlyphIdx & 0xF000) ? (nGlyphIdx & 0x00FF) : (nGlyphIdx | 0xF000 );
-                nGlyphIdx = ::MapChar( pSftFont, static_cast<sal_uInt16>(nGlyphIdx), bVertical );
+                aGlyphId = pGlyphIds[i] & GF_IDXMASK;
+                aGlyphId = (aGlyphId & 0xF000) ? (aGlyphId & 0x00FF) : (aGlyphId | 0xF000 );
+                aGlyphId = ::MapChar( pSftFont, static_cast<sal_uInt16>(aGlyphId), bVertical );
             }
         }
-        aShortIDs[i] = static_cast<sal_uInt16>( nGlyphIdx );
-        if( !nGlyphIdx )
+        aShortIDs[i] = static_cast<sal_uInt16>( aGlyphId );
+        if( !aGlyphId )
             if( nNotDef < 0 )
                 nNotDef = i; // first NotDef glyph found
     }
diff --git a/vcl/inc/aqua/salgdi.h b/vcl/inc/aqua/salgdi.h
index 909ca11..6182f59 100644
--- a/vcl/inc/aqua/salgdi.h
+++ b/vcl/inc/aqua/salgdi.h
@@ -303,7 +303,7 @@ public:
     // as "undefined character"
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData* pFont,
-                                              long* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -339,8 +339,8 @@ public:
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& );
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool                    GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& );
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void                     DrawServerFontLayout( const ServerFontLayout& );
diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx
index 2e52a32..384aaee 100644
--- a/vcl/inc/fontsubset.hxx
+++ b/vcl/inc/fontsubset.hxx
@@ -28,6 +28,7 @@
 #include <tools/string.hxx>
 #include <cstdio>
 
+#include "salglyphid.hxx"
 #include "vcl/dllapi.h"
 
 namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font
@@ -58,7 +59,7 @@ public:
 
     bool        CreateFontSubset( int nOutFontTypeMask,
                     FILE* pOutFile, const char* pOutFontName,
-                    const long* pReqGlyphIds, const sal_uInt8* pEncodedIds,
+                    const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncodedIds,
                     int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL );
 
 public: // TODO: make subsetter results private and provide accessor methods instead
@@ -81,7 +82,7 @@ private:
     int                     mnReqFontTypeMask;  // allowed subset-target font types
     FILE*                   mpOutFile;
     const char*             mpReqFontName;
-    const long*             mpReqGlyphIds;
+    const sal_GlyphId*      mpReqGlyphIds;
     const sal_uInt8*        mpReqEncodedIds;
     int                     mnReqGlyphCount;
 
diff --git a/vcl/inc/glyphcache.hxx b/vcl/inc/glyphcache.hxx
index 5715f0a..26b4d5d 100644
--- a/vcl/inc/glyphcache.hxx
+++ b/vcl/inc/glyphcache.hxx
@@ -80,7 +80,7 @@ private:
     friend class ServerFont;
     // used by ServerFont class only
     void                        AddedGlyph( ServerFont&, GlyphData& );
-    void                        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
+    void                        RemovingGlyph( ServerFont&, GlyphData&, sal_GlyphId );
     void                        UsingGlyph( ServerFont&, GlyphData& );
     void                        GrowNotify();
 
@@ -188,16 +188,16 @@ public:
     virtual const ImplFontCharMap* GetImplFontCharMap() const = 0;
     Point                       TransformPoint( const Point& ) const;
 
-    GlyphData&                  GetGlyphData( int nGlyphIndex );
-    const GlyphMetric&          GetGlyphMetric( int nGlyphIndex )
-                                { return GetGlyphData( nGlyphIndex ).GetMetric(); }
+    GlyphData&                  GetGlyphData( sal_GlyphId );
+    const GlyphMetric&          GetGlyphMetric( sal_GlyphId aGlyphId )
+                                { return GetGlyphData( aGlyphId ).GetMetric(); }
 
-    virtual int                 GetGlyphIndex( sal_UCS4 ) const = 0;
-    virtual bool                GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const = 0;
+    virtual sal_GlyphId         GetGlyphIndex( sal_UCS4 ) const = 0;
+    virtual bool                GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& ) const = 0;
     virtual bool                GetAntialiasAdvice( void ) const = 0;
-    bool                        IsGlyphInvisible( int nGlyphIndex );
-    virtual bool                GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const = 0;
-    virtual bool                GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const = 0;
+    bool                        IsGlyphInvisible( sal_GlyphId );
+    virtual bool                GetGlyphBitmap1( sal_GlyphId, RawBitmap& ) const = 0;
+    virtual bool                GetGlyphBitmap8( sal_GlyphId, RawBitmap& ) const = 0;
 
     void                        SetExtended( int nInfo, void* ppVoid );
     int                         GetExtInfo() { return mnExtInfo; }
@@ -214,7 +214,7 @@ protected:
     long                        Release() const;
     sal_uLong                       GetByteCount() const { return mnBytesUsed; }
 
-    virtual void                InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0;
+    virtual void                InitGlyphData( sal_GlyphId, GlyphData& ) const = 0;
     virtual void                GarbageCollect( long );
     void                        ReleaseFromGarbageCollect();
 
diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx
index b56c138..44e686a 100644
--- a/vcl/inc/graphite_layout.hxx
+++ b/vcl/inc/graphite_layout.hxx
@@ -48,12 +48,6 @@
 #include <vcl/dllapi.h>
 // Module
 
-// For backwards compatibility with 2.4.x
-#if (SUPD == 680)
-typedef sal_Int32 sal_GlyphId;
-#endif
-
-
 // Module type definitions and forward declarations.
 //
 class TextSourceAdaptor;
diff --git a/vcl/inc/os2/salgdi.h b/vcl/inc/os2/salgdi.h
index bc051f7..532160b 100644
--- a/vcl/inc/os2/salgdi.h
+++ b/vcl/inc/os2/salgdi.h
@@ -288,7 +288,7 @@ public:
     // as "undefined character"
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData* pFont,
-                                              long* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -324,8 +324,8 @@ public:
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool                    GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& );
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void                     DrawServerFontLayout( const ServerFontLayout& );
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 1480794..0e5ec42 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -29,6 +29,7 @@
 #include "vcl/sv.h"
 #include "vcl/dllapi.h"
 #include "vcl/salgtype.hxx"
+#include "salglyphid.hxx"
 #include "vos/thread.hxx"
 #include "vcl/outdev.hxx"
 #include "vcl/salnativewidgets.hxx"
@@ -264,7 +265,7 @@ public:
     // as "undefined character"
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData* pFont,
-                                              sal_Int32* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -306,8 +307,8 @@ public:
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc ) = 0;
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& ) = 0;
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0;
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& ) = 0;
+    virtual bool                    GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) = 0;
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
     virtual void                     DrawServerFontLayout( const ServerFontLayout& ) = 0;
diff --git a/vcl/inc/salglyphid.hxx b/vcl/inc/salglyphid.hxx
new file mode 100644
index 0000000..39c57e9
--- /dev/null
+++ b/vcl/inc/salglyphid.hxx
@@ -0,0 +1,49 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SV_SALGLYPHID_HXX
+#define _SV_SALGLYPHID_HXX
+
+// TODO: sal_GlyphId should become a class...
+typedef sal_uInt32 sal_GlyphId;
+
+// Glyph Flags
+#define GF_NONE     0x00000000
+#define GF_FLAGMASK 0xFF800000
+#define GF_IDXMASK  ~GF_FLAGMASK
+#define GF_ISCHAR   0x00800000
+#define GF_ROTL     0x01000000
+// caution !!!
+#define GF_VERT     0x02000000
+// GF_VERT is only for windows implementation
+// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx)
+// don't use this elsewhere !!!
+#define GF_ROTR     0x03000000
+#define GF_ROTMASK  0x03000000
+#define GF_UNHINTED 0x04000000
+#define GF_GSUB     0x08000000
+#define GF_FONTMASK 0xF0000000
+#define GF_FONTSHIFT 28
+
+#define GF_DROPPED  0xFFFFFFFF
+
+#endif // _SV_SALGLYPHID_HXX
+
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 6924a6d..231c2f0 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -38,6 +38,7 @@ typedef unsigned short LanguageType;
 
 // for typedef sal_UCS4
 #include <vcl/vclenum.hxx>
+#include "salglyphid.hxx"
 
 class SalGraphics;
 class ImplFontData;
@@ -146,28 +147,6 @@ VCL_PLUGIN_PUBLIC const char* GetAutofallback( sal_UCS4 ) ;
 // - SalLayout -
 // -------------
 
-typedef sal_uInt32 sal_GlyphId;
-
-// Glyph Flags
-#define GF_NONE     0x00000000
-#define GF_FLAGMASK 0xFF800000
-#define GF_IDXMASK  ~GF_FLAGMASK
-#define GF_ISCHAR   0x00800000
-#define GF_ROTL     0x01000000
-// caution !!!
-#define GF_VERT     0x02000000
-// GF_VERT is only for windows implementation
-// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx)
-// don't use this elsewhere !!!
-#define GF_ROTR     0x03000000
-#define GF_ROTMASK  0x03000000
-#define GF_UNHINTED 0x04000000
-#define GF_GSUB     0x08000000
-#define GF_FONTMASK 0xF0000000
-#define GF_FONTSHIFT 28
-
-#define GF_DROPPED  0xFFFFFFFF
-
 // all positions/widths are in font units
 // one exception: drawposition is in pixel units
 
@@ -306,17 +285,17 @@ struct GlyphItem
     int     mnCharPos;      // index in string
     int     mnOrigWidth;    // original glyph width
     int     mnNewWidth;     // width after adjustments
-    sal_GlyphId mnGlyphIndex;
+    sal_GlyphId maGlyphId;
     Point   maLinearPos;    // absolute position of non rotated string
 
 public:
             GlyphItem() {}
 
-            GlyphItem( int nCharPos, sal_GlyphId nGlyphIndex, const Point& rLinearPos,
+            GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& rLinearPos,
                 long nFlags, int nOrigWidth )
             :   mnFlags(nFlags), mnCharPos(nCharPos),
                 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
-                mnGlyphIndex(nGlyphIndex), maLinearPos(rLinearPos)
+                maGlyphId(aGlyphId), maLinearPos(rLinearPos)
             {}
 
     enum{ FALLBACK_MASK=0xFF, IS_IN_CLUSTER=0x100, IS_RTL_GLYPH=0x200, IS_DIACRITIC=0x400 };
diff --git a/vcl/inc/unx/pspgraphics.h b/vcl/inc/unx/pspgraphics.h
index 8464ad7..2410141 100644
--- a/vcl/inc/unx/pspgraphics.h
+++ b/vcl/inc/unx/pspgraphics.h
@@ -104,7 +104,7 @@ public:
     virtual bool            AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData*,
-                                              sal_Int32* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -121,8 +121,8 @@ public:
                                             bool bVertical,
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
-    virtual sal_Bool            GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool            GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool            GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool            GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& );
     virtual SalLayout*      GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void            DrawServerFontLayout( const ServerFontLayout& );
     virtual bool            supportsOperation( OutDevSupportType ) const;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 41853cb..243f10e 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -251,7 +251,7 @@ public:
     virtual bool            AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData*,
-                                              sal_Int32* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -268,8 +268,8 @@ public:
                                             bool bVertical,
                                             Int32Vector& rWidths,
                                             Ucs2UIntMap& rUnicodeEnc );
-    virtual sal_Bool            GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool            GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool            GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+    virtual bool            GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
     virtual SalLayout*      GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void            DrawServerFontLayout( const ServerFontLayout& );
     virtual bool            supportsOperation( OutDevSupportType ) const;
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index d13e417..1102c17 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -32,6 +32,7 @@
 
 #include "vcl/dllapi.h"
 #include "vcl/helper.hxx"
+#include "salglyphid.hxx"
 
 #include "com/sun/star/lang/Locale.hpp"
 
@@ -643,7 +644,7 @@ public:
     bool createFontSubset( FontSubsetInfo&,
                            fontID nFont,
                            const rtl::OUString& rOutFile,
-                           sal_Int32* pGlyphIDs,
+                           sal_GlyphId* pGlyphIds,
                            sal_uInt8* pNewEncoding,
                            sal_Int32* pWidths,
                            int nGlyphs,
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index dd909d2..a1bc265 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -318,7 +318,7 @@ public:
     // as "undefined character"
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
                                               const ImplFontData*,
-                                              long* pGlyphIDs,
+                                              sal_GlyphId* pGlyphIds,
                                               sal_uInt8* pEncoding,
                                               sal_Int32* pWidths,
                                               int nGlyphs,
@@ -354,8 +354,8 @@ public:
                                             Ucs2UIntMap& rUnicodeEnc );
     virtual int             GetMinKashidaWidth();
 
-    virtual sal_Bool                    GetGlyphBoundRect( long nIndex, Rectangle& );
-    virtual sal_Bool                    GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+    virtual bool                    GetGlyphBoundRect( sal_GlyphId, Rectangle& );
+    virtual bool                    GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& );
 
     virtual SalLayout*              GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
     virtual void                     DrawServerFontLayout( const ServerFontLayout& );
diff --git a/vcl/os2/source/gdi/os2layout.cxx b/vcl/os2/source/gdi/os2layout.cxx
index f713a3b..36eabac 100644
--- a/vcl/os2/source/gdi/os2layout.cxx
+++ b/vcl/os2/source/gdi/os2layout.cxx
@@ -507,7 +507,7 @@ bool Os2SalLayout::LayoutText( ImplLayoutArgs& rArgs )
 
 // -----------------------------------------------------------------------
 
-int Os2SalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int& nStart,
+int Os2SalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& rPos, int& nStart,
     sal_Int32* pGlyphAdvances, int* pCharIndexes ) const
 {
     // return zero if no more glyph found
@@ -527,29 +527,29 @@ int Os2SalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, in
     int nCount = 0;
     while( nCount < nLen )
     {
-        // update return values {nGlyphIndex,nCharPos,nGlyphAdvance}
-        long nGlyphIndex = mpOutGlyphs[ nStart ];
+        // update return values {aGlyphId,nCharPos,nGlyphAdvance}
+        sal_GlyphId aGlyphId = mpOutGlyphs[ nStart ];
         if( mbDisableGlyphs )
         {
             if( mnLayoutFlags & SAL_LAYOUT_VERTICAL )
             {
-                sal_Unicode cChar = (sal_Unicode)(nGlyphIndex & GF_IDXMASK);
+                sal_Unicode cChar = (sal_Unicode)(aGlyphId & GF_IDXMASK);
 #ifdef GNG_VERT_HACK
                 if( mrOs2FontData.HasGSUBstitutions( mhPS )
                 &&  mrOs2FontData.IsGSUBstituted( cChar ) )
-                    nGlyphIndex |= GF_ROTL | GF_GSUB;
+                    aGlyphId |= GF_ROTL | GF_GSUB;
                 else
 #endif // GNG_VERT_HACK
                 {
-                    nGlyphIndex |= GetVerticalFlags( cChar );
-                    if( !(nGlyphIndex & GF_ROTMASK) )
-                        nGlyphIndex |= GF_VERT;
+                    aGlyphId |= GetVerticalFlags( cChar );
+                    if( !(aGlyphId & GF_ROTMASK) )
+                        aGlyphId |= GF_VERT;
                 }
             }
-            nGlyphIndex |= GF_ISCHAR;
+            aGlyphId |= GF_ISCHAR;
         }
         ++nCount;
-        *(pGlyphs++) = nGlyphIndex;
+        *(pGlyphIds++) = aGlyphId;
         if( pGlyphAdvances )
             *(pGlyphAdvances++) = mpGlyphAdvances[ nStart ];
         if( pCharIndexes )
diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx
index 8e06945..2de80e8 100644
--- a/vcl/os2/source/gdi/salgdi3.cxx
+++ b/vcl/os2/source/gdi/salgdi3.cxx
@@ -1198,7 +1198,7 @@ void Os2SalGraphics::GetDevFontSubstList( OutputDevice* pOutDev )
 
 // -----------------------------------------------------------------------
 
-sal_Bool Os2SalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
+bool Os2SalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
 {
     // use unity matrix
     MAT2 aMat;
@@ -1206,13 +1206,13 @@ sal_Bool Os2SalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
     aMat.eM12 = aMat.eM21 = FixedFromDouble( 0.0 );
 
     UINT nGGOFlags = GGO_METRICS;
-    if( !(nIndex & GF_ISCHAR) )
+    if( !(aGlyphId & GF_ISCHAR) )
         nGGOFlags |= GGO_GLYPH_INDEX;
-    nIndex &= GF_IDXMASK;
+    aGlyphId &= GF_IDXMASK;
 
     GLYPHMETRICS aGM;
     DWORD nSize = FT2_ERROR;
-    nSize = Ft2GetGlyphOutline( mhPS, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat );
+    nSize = Ft2GetGlyphOutline( mhPS, aGlyphId, nGGOFlags, &aGM, 0, NULL, &aMat );
     if( nSize == FT2_ERROR )
         return false;
 
@@ -1227,7 +1227,7 @@ sal_Bool Os2SalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
 
 // -----------------------------------------------------------------------
 
-sal_Bool Os2SalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
+bool Os2SalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, ::basegfx::B2DPolyPolygon& rB2DPolyPoly )
 {
 #if OSL_DEBUG_LEVEL>0
     debug_printf("Os2SalGraphics::GetGlyphOutline\n");
@@ -1242,13 +1242,13 @@ sal_Bool Os2SalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon
     aMat.eM12 = aMat.eM21 = FixedFromDouble( 0.0 );
 
     UINT nGGOFlags = GGO_NATIVE;
-    if( !(nIndex & GF_ISCHAR) )
+    if( !(aGlyphId & GF_ISCHAR) )
         nGGOFlags |= GGO_GLYPH_INDEX;
-    nIndex &= GF_IDXMASK;
+    aGlyphId &= GF_IDXMASK;
 
     GLYPHMETRICS aGlyphMetrics;
     DWORD nSize1 = FT2_ERROR;
-    nSize1 = Ft2GetGlyphOutline( mhPS, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
+    nSize1 = Ft2GetGlyphOutline( mhPS, aGlyphId, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
 
     if( !nSize1 )       // blank glyphs are ok
         bRet = TRUE;
@@ -1257,7 +1257,7 @@ sal_Bool Os2SalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon
         PM_BYTE*   pData = new PM_BYTE[ nSize1 ];
         ULONG   nTotalCount = 0;
         DWORD   nSize2;
-        nSize2 = Ft2GetGlyphOutline( mhPS, nIndex, nGGOFlags,
+        nSize2 = Ft2GetGlyphOutline( mhPS, aGlyphId, nGGOFlags,
                 &aGlyphMetrics, nSize1, pData, &aMat );
 
         if( nSize1 == nSize2 )
@@ -1497,7 +1497,7 @@ int ScopedTrueTypeFont::open(void * pBuffer, sal_uInt32 nLen,
 }
 
 sal_Bool Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
-    const ImplFontData* pFont, long* pGlyphIDs, sal_uInt8* pEncoding,
+    const ImplFontData* pFont, sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding,
     sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
 {
     // TODO: use more of the central font-subsetting code, move stuff there if needed
@@ -1536,25 +1536,25 @@ sal_Bool Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
     const RawFontData aRawCffData( mhPS, nCffTag );
     if( aRawCffData.get() )
     {
-        long nRealGlyphIds[ 256 ];
+        sal_GlyphId aRealGlyphIds[ 256 ];
         for( int i = 0; i < nGlyphCount; ++i )
         {
             // TODO: remap notdef glyph if needed
             // TODO: use GDI's GetGlyphIndices instead? Does it handle GSUB properly?
-            sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-            if( pGlyphIDs[i] & GF_ISCHAR ) // remaining pseudo-glyphs need to be translated
-                nGlyphIdx = pImplFontCharMap->GetGlyphIndex( nGlyphIdx );
-            if( (pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0) // TODO: vertical substitution
+            sal_uInt32 aGlyphIdx = pGlyphIds[i] & GF_IDXMASK;
+            if( pGlyphIds[i] & GF_ISCHAR ) // remaining pseudo-glyphs need to be translated
+                aGlyphId = pImplFontCharMap->GetGlyphIndex( aGlyphId );
+            if( (pGlyphIds[i] & (GF_ROTMASK|GF_GSUB)) != 0) // TODO: vertical substitution
                 {/*####*/}
 
-            nRealGlyphIds[i] = nGlyphIdx;
+            aRealGlyphIds[i] = aGlyphId;
         }
 
         // provide a font subset from the CFF-table
         FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" );
         rInfo.LoadFont( FontSubsetInfo::CFF_FONT, aRawCffData.get(), aRawCffData.size() );
         bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL,
-                nRealGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
+                aRealGlyphIds, pEncoding, nGlyphCount, pGlyphWidths );
         fclose( pOutFile );
         return bRC;
     }
@@ -1594,21 +1594,21 @@ sal_Bool Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
     for( i = 0; i < nGlyphCount; ++i )
     {
         aTempEncs[i] = pEncoding[i];
-        sal_uInt32 nGlyphIdx = pGlyphIDs[i] & GF_IDXMASK;
-        if( pGlyphIDs[i] & GF_ISCHAR )
+        sal_GlyphId aGlyphId = pGlyphIds[i] & GF_IDXMASK;
+        if( pGlyphIds[i] & GF_ISCHAR )
         {
-            sal_Unicode cChar = static_cast<sal_Unicode>(nGlyphIdx); // TODO: sal_UCS4
-            const bool bVertical = ((pGlyphIDs[i] & (GF_ROTMASK|GF_GSUB)) != 0);
-            nGlyphIdx = ::MapChar( aSftTTF.get(), cChar, bVertical );
-            if( (nGlyphIdx == 0) && pFont->IsSymbolFont() )
+            sal_Unicode cChar = static_cast<sal_Unicode>(aGlyphId); // TODO: sal_UCS4
+            const bool bVertical = ((pGlyphIds[i] & (GF_ROTMASK|GF_GSUB)) != 0);
+            aGlyphId = ::MapChar( aSftTTF.get(), cChar, bVertical );
+            if( (aGlyphId == 0) && pFont->IsSymbolFont() )
             {
                 // #i12824# emulate symbol aliasing U+FXXX <-> U+0XXX
                 cChar = (cChar & 0xF000) ? (cChar & 0x00FF) : (cChar | 0xF000);
-                nGlyphIdx = ::MapChar( aSftTTF.get(), cChar, bVertical );
+                aGlyphId = ::MapChar( aSftTTF.get(), cChar, bVertical );
             }
         }
-        aShortIDs[i] = static_cast<USHORT>( nGlyphIdx );
-        if( !nGlyphIdx )
+        aShortIDs[i] = static_cast<USHORT>( aGlyphId );
+        if( !aGlyphId )
             if( nNotDef < 0 )
                 nNotDef = i; // first NotDef glyph found
     }
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index f3bc508..3dca2c8 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -28,7 +28,7 @@
 #include <cstring>
 #include <assert.h>
 
-#include <fontsubset.hxx>
+#include "fontsubset.hxx"
 
 #include <vcl/strhelper.hxx>
 
@@ -358,7 +358,7 @@ class SubsetterContext
 public:
     virtual ~SubsetterContext( void);
     virtual bool emitAsType1( class Type1Emitter&,
-                const long* pGlyphIDs, const U8* pEncoding,
+                const sal_GlyphId* pGlyphIds, const U8* pEncoding,
                 GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ) = 0;
 };
 
@@ -383,7 +383,7 @@ public:
 
     void    initialCffRead( void);
     bool    emitAsType1( class Type1Emitter&,
-                const long* pGlyphIDs, const U8* pEncoding,
+                const sal_GlyphId* pGlyphIds, const U8* pEncoding,
                 GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& );
 
     // used by charstring converter
@@ -2081,7 +2081,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
 // --------------------------------------------------------------------
 
 bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
-    const long* pReqGlyphIDs, const U8* pReqEncoding,
+    const sal_GlyphId* pReqGlyphIds, const U8* pReqEncoding,
     GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo)
 {
     // prepare some fontdirectory details
@@ -2163,7 +2163,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
         "/Encoding 256 array\n"
         "0 1 255 {1 index exch /.notdef put} for\n");
     for( int i = 1; (i < nGlyphCount) && (i < 256); ++i) {
-        const char* pGlyphName = getGlyphName( pReqGlyphIDs[i]);
+        const char* pGlyphName = getGlyphName( pReqGlyphIds[i]);
         pOut += sprintf( pOut, "dup %d /%s put\n", pReqEncoding[i], pGlyphName);
     }
     pOut += sprintf( pOut, "readonly def\n");
@@ -2314,20 +2314,20 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
         "2 index /CharStrings %d dict dup begin\n", nGlyphCount);
     rEmitter.emitAllCrypted();
     for( int i = 0; i < nGlyphCount; ++i) {
-        const int nGlyphId = pReqGlyphIDs[i];
-        assert( (nGlyphId >= 0) && (nGlyphId < mnCharStrCount));
+        const int nCffGlyphId = pReqGlyphIds[i];
+        assert( (nCffGlyphId >= 0) && (nCffGlyphId < mnCharStrCount));
         // get privdict context matching to the glyph
-        const int nFDSelect = getFDSelect( nGlyphId);
+        const int nFDSelect = getFDSelect( nCffGlyphId);
         if( nFDSelect < 0)
             continue;
         mpCffLocal = &maCffLocal[ nFDSelect];
         // convert the Type2op charstring to its Type1op counterpart
-        const int nT2Len = seekIndexData( mnCharStrBase, nGlyphId);
+        const int nT2Len = seekIndexData( mnCharStrBase, nCffGlyphId);
         assert( nT2Len > 0);
         U8 aType1Ops[ MAX_T1OPS_SIZE]; // TODO: dynamic allocation
         const int nT1Len = convert2Type1Ops( mpCffLocal, mpReadPtr, nT2Len, aType1Ops);
         // get the glyph name
-        const char* pGlyphName = getGlyphName( nGlyphId);
+        const char* pGlyphName = getGlyphName( nCffGlyphId);
         // emit the encrypted Type1op charstring
         pOut += sprintf( pOut, "/%s %d RD ", pGlyphName, nT1Len);
         memcpy( pOut, aType1Ops, nT1Len);
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index 03544f3..aaccfb2 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -77,7 +77,7 @@ bool FontSubsetInfo::LoadFont( vcl::_TrueTypeFont* pSftTTFont )
 bool FontSubsetInfo::CreateFontSubset(
     int nReqFontTypeMask,
     FILE* pOutFile, const char* pReqFontName,
-    const long* pReqGlyphIds, const sal_uInt8* pReqEncodedIds, int nReqGlyphCount,
+    const sal_GlyphId* pReqGlyphIds, const sal_uInt8* pReqEncodedIds, int nReqGlyphCount,
     sal_Int32* pOutGlyphWidths)
 {
     // prepare request details needed by all underlying subsetters
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 5aa82a3..2657f23 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4165,12 +4165,12 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout,
         for( int nStart = 0;;)
         {
             // iterate through the layouted glyphs
-            sal_GlyphId nGlyphIndex;
-            if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
+            sal_GlyphId aGlyphId;
+            if( !rSalLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
                 break;
 
             // calculate the boundaries of each word
-            if( !rSalLayout.IsSpacingGlyph( nGlyphIndex ) )
+            if( !rSalLayout.IsSpacingGlyph( aGlyphId ) )
             {
                 if( !nWidth )
                 {
@@ -4490,14 +4490,14 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
     Rectangle aRectangle;
     for( int nStart = 0;;)
     {
-        sal_GlyphId nGlyphIndex;
-        if( !rSalLayout.GetNextGlyphs( 1, &nGlyphIndex, aOutPoint, nStart ) )
+        sal_GlyphId aGlyphId;
+        if( !rSalLayout.GetNextGlyphs( 1, &aGlyphId, aOutPoint, nStart ) )
             break;
 
-        if( !mpGraphics->GetGlyphBoundRect( nGlyphIndex, aRectangle ) )
+        if( !mpGraphics->GetGlyphBoundRect( aGlyphId, aRectangle ) )
             continue;
 
-        if( !rSalLayout.IsSpacingGlyph( nGlyphIndex ) )
+        if( !rSalLayout.IsSpacingGlyph( aGlyphId ) )
         {
             Point aAdjPoint = aOffset;
             aAdjPoint.X() += aRectangle.Left() + (aRectangle.GetWidth() - nEmphasisWidth) / 2;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d3b5d27..cbc088e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3155,12 +3155,12 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
 
         OUString aTmpName;
         osl_createTempFile( NULL, NULL, &aTmpName.pData );
-        sal_Int32 pGlyphIDs[ 256 ];
+        sal_GlyphId aGlyphIds[ 256 ];
         sal_uInt8 pEncoding[ 256 ];
         sal_Ucs   pUnicodes[ 256 ];
         sal_Int32 pDuWidths[ 256 ];
 
-        memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) );
+        memset( aGlyphIds, 0, sizeof( aGlyphIds ) );
         memset( pEncoding, 0, sizeof( pEncoding ) );
         memset( pUnicodes, 0, sizeof( pUnicodes ) );
         memset( pDuWidths, 0, sizeof( pDuWidths ) );
@@ -3169,12 +3169,12 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
         {
             pUnicodes[c] = c;
             pEncoding[c] = c;
-            pGlyphIDs[c] = 0;
+            aGlyphIds[c] = 0;
             if( aUnicodeMap.find( c ) != aUnicodeMap.end() )
                 pWidths[ c ] = aGlyphWidths[ aUnicodeMap[ c ] ];
         }
 
-        m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, pFont, pGlyphIDs, pEncoding, pDuWidths, 256, aInfo );
+        m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, pFont, aGlyphIds, pEncoding, pDuWidths, 256, aInfo );
         osl_removeFile( aTmpName.pData );
     }
     else
@@ -4051,7 +4051,7 @@ bool PDFWriterImpl::emitFonts()
     {
         for( FontEmitList::iterator lit = it->second.m_aSubsets.begin(); lit != it->second.m_aSubsets.end(); ++lit )
         {
-            sal_Int32 pGlyphIDs[ 256 ];
+            sal_GlyphId aGlyphIds[ 256 ];
             sal_Int32 pWidths[ 256 ];
             sal_uInt8 pEncoding[ 256 ];
             sal_Int32 pEncToUnicodeIndex[ 256 ];
@@ -4062,7 +4062,7 @@ bool PDFWriterImpl::emitFonts()
             // fill arrays and prepare encoding index map
             sal_Int32 nToUnicodeStream = 0;
 
-            rtl_zeroMemory( pGlyphIDs, sizeof( pGlyphIDs ) );
+            rtl_zeroMemory( aGlyphIds, sizeof( aGlyphIds ) );
             rtl_zeroMemory( pEncoding, sizeof( pEncoding ) );
             rtl_zeroMemory( pUnicodesPerGlyph, sizeof( pUnicodesPerGlyph ) );
             rtl_zeroMemory( pEncToUnicodeIndex, sizeof( pEncToUnicodeIndex ) );
@@ -4070,10 +4070,10 @@ bool PDFWriterImpl::emitFonts()
             {
                 sal_uInt8 nEnc = fit->second.getGlyphId();
 
-                DBG_ASSERT( pGlyphIDs[nEnc] == 0 && pEncoding[nEnc] == 0, "duplicate glyph" );
+                DBG_ASSERT( aGlyphIds[nEnc] == 0 && pEncoding[nEnc] == 0, "duplicate glyph" );
                 DBG_ASSERT( nEnc <= lit->m_aMapping.size(), "invalid glyph encoding" );
 
-                pGlyphIDs[ nEnc ] = fit->first;
+                aGlyphIds[ nEnc ] = fit->first;
                 pEncoding[ nEnc ] = nEnc;
                 pEncToUnicodeIndex[ nEnc ] = static_cast<sal_Int32>(aUnicodes.size());
                 pUnicodesPerGlyph[ nEnc ] = fit->second.countCodes();
@@ -4089,7 +4089,7 @@ bool PDFWriterImpl::emitFonts()
                 }
             }
             FontSubsetInfo aSubsetInfo;
-            if( m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, it->first, pGlyphIDs, pEncoding, pWidths, nGlyphs, aSubsetInfo ) )
+            if( m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, it->first, aGlyphIds, pEncoding, pWidths, nGlyphs, aSubsetInfo ) )
             {
                 // create font stream
                 oslFileHandle aFontFile;
@@ -7575,11 +7575,11 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
             sal_Int32 nWidth = 0, nAdvance=0;
             for( int nStart = 0;;)
             {
-                sal_GlyphId nGlyphIndex;
-                if( !rLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
+                sal_GlyphId aGlyphId;
+                if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
                     break;
 
-                if( !rLayout.IsSpacingGlyph( nGlyphIndex ) )
+                if( !rLayout.IsSpacingGlyph( aGlyphId ) )
                 {
                     if( !nWidth )
                         aStartPt = aPos;
@@ -7674,12 +7674,12 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
         for( int nStart = 0;;)
         {
             Point aPos;
-            sal_GlyphId nGlyphIndex;
+            sal_GlyphId aGlyphId;
             sal_Int32 nAdvance;
-            if( !rLayout.GetNextGlyphs( 1, &nGlyphIndex, aPos, nStart, &nAdvance ) )
+            if( !rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart, &nAdvance ) )
                 break;
 
-            if( !rLayout.IsSpacingGlyph( nGlyphIndex ) )
+            if( !rLayout.IsSpacingGlyph( aGlyphId ) )
             {
                 Point aAdjOffset = aOffset;
                 aAdjOffset.X() += (nAdvance - nEmphWidth) / 2;
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 18fef6e..0c59f79 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -949,10 +949,10 @@ bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph ) const
 
 // -----------------------------------------------------------------------
 
-const ImplFontData* SalLayout::GetFallbackFontData( sal_GlyphId /*nGlyphId*/ ) const
+const ImplFontData* SalLayout::GetFallbackFontData( sal_GlyphId /*aGlyphId*/ ) const
 {
 #if 0
-    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT
+    int nFallbackLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT
     assert( nFallbackLevel == 0 );
 #endif
     return NULL;
@@ -1363,7 +1363,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
         if( !pG1->IsRTLGlyph() )
             continue;
         // no kashida-injection for blank justified expansion either
-        if( IsSpacingGlyph( pG1->mnGlyphIndex ) )
+        if( IsSpacingGlyph( pG1->maGlyphId ) )
             continue;
 
         // calculate gap, ignore if too small
@@ -1391,7 +1391,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
         if( !pG1->IsRTLGlyph() )
             continue;
         // no kashida-injection for blank justified expansion either
-        if( IsSpacingGlyph( pG1->mnGlyphIndex ) )
+        if( IsSpacingGlyph( pG1->maGlyphId ) )
             continue;
 
         // calculate gap, skip if too small
@@ -1513,12 +1513,12 @@ int GenericSalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos
     // find more glyphs which can be merged into one drawing instruction
     int nCount = 0;
     long nYPos = pG->maLinearPos.Y();
-    long nOldFlags = pG->mnGlyphIndex;
+    long nOldFlags = pG->maGlyphId;
     for(;;)
     {
         // update return data with glyph info
         ++nCount;
-        *(pGlyphs++) = pG->mnGlyphIndex;
+        *(pGlyphs++) = pG->maGlyphId;
         if( pCharPosAry )
             *(pCharPosAry++) = pG->mnCharPos;
         if( pGlyphAdvAry )
@@ -1557,10 +1557,10 @@ int GenericSalLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos
             break;
 
         // stop when glyph flags change
-        if( (nOldFlags ^ pG->mnGlyphIndex) & GF_FLAGMASK )
+        if( (nOldFlags ^ pG->maGlyphId) & GF_FLAGMASK )
             break;
 
-        nOldFlags = pG->mnGlyphIndex; // &GF_FLAGMASK not needed for test above
+        nOldFlags = pG->maGlyphId; // &GF_FLAGMASK not needed for test above
     }
 
     aRelativePos.X() /= mnUnitsPerPixel;
@@ -1601,7 +1601,7 @@ void GenericSalLayout::DropGlyph( int nStart )
     if( nStart >= mnGlyphCount )
         return;
     GlyphItem* pG = mpGlyphItems + nStart;
-    pG->mnGlyphIndex = GF_DROPPED;
+    pG->maGlyphId = GF_DROPPED;
     pG->mnCharPos = -1;
 }
 
@@ -1617,7 +1617,7 @@ void GenericSalLayout::Simplify( bool bIsBase )
     const GlyphItem* pGEnd = mpGlyphItems + mnGlyphCount;
     for(; pGSrc < pGEnd; ++pGSrc )
     {
-        if( pGSrc->mnGlyphIndex == nDropMarker )
+        if( pGSrc->maGlyphId == nDropMarker )
             continue;
         if( pGDst != pGSrc )
             *pGDst = *pGSrc;
@@ -2097,9 +2097,9 @@ void MultiSalLayout::InitFont() const
 
 // -----------------------------------------------------------------------
 
-const ImplFontData* MultiSalLayout::GetFallbackFontData( sal_GlyphId nGlyphId ) const
+const ImplFontData* MultiSalLayout::GetFallbackFontData( sal_GlyphId aGlyphId ) const
 {
-    int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
+    int nFallbackLevel = (aGlyphId & GF_FONTMASK) >> GF_FONTSHIFT;
     return mpFallbackFonts[ nFallbackLevel ];
 }
 
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 0519b1a..8219bc9 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -1080,13 +1080,13 @@ void FreetypeServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor
 
 // -----------------------------------------------------------------------
 
-static inline void SplitGlyphFlags( const FreetypeServerFont& rFont, int& nGlyphIndex, int& nGlyphFlags )
+static inline void SplitGlyphFlags( const FreetypeServerFont& rFont, sal_GlyphId& rGlyphId, int& nGlyphFlags )
 {
-    nGlyphFlags = nGlyphIndex & GF_FLAGMASK;
-    nGlyphIndex &= GF_IDXMASK;
+    nGlyphFlags = rGlyphId & GF_FLAGMASK;
+    rGlyphId &= GF_IDXMASK;
 
-    if( nGlyphIndex & GF_ISCHAR )
-        nGlyphIndex = rFont.GetRawGlyphIndex( nGlyphIndex );
+    if( rGlyphId & GF_ISCHAR )
+        rGlyphId = rFont.GetRawGlyphIndex( rGlyphId );
 }
 
 // -----------------------------------------------------------------------
@@ -1174,7 +1174,7 @@ int FreetypeServerFont::ApplyGlyphTransform( int nGlyphFlags,
 
 // -----------------------------------------------------------------------
 
-int FreetypeServerFont::GetRawGlyphIndex( sal_UCS4 aChar ) const
+sal_GlyphId FreetypeServerFont::GetRawGlyphIndex( sal_UCS4 aChar ) const
 {
     if( mpFontInfo->IsSymbolFont() )
     {
@@ -1232,12 +1232,12 @@ int FreetypeServerFont::GetRawGlyphIndex( sal_UCS4 aChar ) const
         mpFontInfo->CacheGlyphIndex( aChar, nGlyphIndex );
     }
 
-    return nGlyphIndex;
+    return sal_GlyphId( nGlyphIndex);
 }
 
 // -----------------------------------------------------------------------
 
-int FreetypeServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const
+sal_GlyphId FreetypeServerFont::FixupGlyphIndex( sal_GlyphId aGlyphId, sal_UCS4 aChar ) const
 {
     int nGlyphFlags = GF_NONE;
 
@@ -1246,21 +1246,21 @@ int FreetypeServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const
     if( GetFontSelData().mbVertical )
     {
         // TODO: rethink when GSUB is used for non-vertical case
-        GlyphSubstitution::const_iterator it = maGlyphSubstitution.find( nGlyphIndex );
+        GlyphSubstitution::const_iterator it = maGlyphSubstitution.find( aGlyphId );
         if( it == maGlyphSubstitution.end() )
         {
-            int nTemp = GetVerticalChar( aChar );
+            sal_GlyphId nTemp = GetVerticalChar( aChar );
             if( nTemp ) // is substitution possible
                 nTemp = GetRawGlyphIndex( nTemp );
             if( nTemp ) // substitute manually if sensible
-                nGlyphIndex = nTemp | (GF_GSUB | GF_ROTL);
+                aGlyphId = nTemp | (GF_GSUB | GF_ROTL);
             else
                 nGlyphFlags |= GetVerticalFlags( aChar );
         }
         else
         {
             // for vertical GSUB also compensate for nOrientation=2700
-            nGlyphIndex = (*it).second;
+            aGlyphId = (*it).second;
             nGlyphFlags |= GF_GSUB | GF_ROTL;
         }
     }
@@ -1276,20 +1276,20 @@ int FreetypeServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const
     }
 #endif
 
-    if( nGlyphIndex != 0 )
-        nGlyphIndex |= nGlyphFlags;
+    if( aGlyphId != 0 )
+        aGlyphId |= nGlyphFlags;
 
-    return nGlyphIndex;
+    return aGlyphId;
 }
 
 
 // -----------------------------------------------------------------------
 
-int FreetypeServerFont::GetGlyphIndex( sal_UCS4 aChar ) const
+sal_GlyphId FreetypeServerFont::GetGlyphIndex( sal_UCS4 aChar ) const
 {
-    int nGlyphIndex = GetRawGlyphIndex( aChar );
-    nGlyphIndex = FixupGlyphIndex( nGlyphIndex, aChar );
-    return nGlyphIndex;
+    sal_GlyphId aGlyphId = GetRawGlyphIndex( aChar );
+    aGlyphId = FixupGlyphIndex( aGlyphId, aChar );
+    return aGlyphId;
 }
 
 // -----------------------------------------------------------------------
@@ -1313,13 +1313,13 @@ static int lcl_GetCharWidth( FT_FaceRec_* pFaceFT, double fStretch, int nGlyphFl
 
 // -----------------------------------------------------------------------
 
-void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
+void FreetypeServerFont::InitGlyphData( sal_GlyphId aGlyphId, GlyphData& rGD ) const
 {
     if( maSizeFT )
         pFTActivateSize( maSizeFT );
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     int nLoadFlags = mnLoadFlags;
 
@@ -1332,7 +1332,7 @@ void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
     // => first we have to try without hinting
     if( (nLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) == 0 )
     {
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags|FT_LOAD_NO_HINTING );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags|FT_LOAD_NO_HINTING );
         if( (rc==FT_Err_Ok) && (maFaceFT->glyph->format!=FT_GLYPH_FORMAT_BITMAP) )
             rc = -1; // mark as "loading embedded bitmap" was unsuccessful
         nLoadFlags |= FT_LOAD_NO_BITMAP;
@@ -1340,7 +1340,7 @@ void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
 
     if( rc != FT_Err_Ok )
 #endif
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
 
     if( rc != FT_Err_Ok )
     {
@@ -1393,13 +1393,13 @@ bool FreetypeServerFont::GetAntialiasAdvice( void ) const
 
 // -----------------------------------------------------------------------
 
-bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap ) const
+bool FreetypeServerFont::GetGlyphBitmap1( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap ) const
 {
     if( maSizeFT )
         pFTActivateSize( maSizeFT );
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     FT_Int nLoadFlags = mnLoadFlags;
     // #i70930# force mono-hinting for monochrome text
@@ -1428,7 +1428,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
     // => first we have to try without hinting
     if( (nLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) == 0 )
     {
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags|FT_LOAD_NO_HINTING );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags|FT_LOAD_NO_HINTING );
         if( (rc==FT_Err_Ok) && (maFaceFT->glyph->format != FT_GLYPH_FORMAT_BITMAP) )
             rc = -1; // mark as "loading embedded bitmap" was unsuccessful
         nLoadFlags |= FT_LOAD_NO_BITMAP;
@@ -1436,7 +1436,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
 
     if( rc != FT_Err_Ok )
 #endif
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
     if( rc != FT_Err_Ok )
         return false;
 
@@ -1567,13 +1567,13 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
 
 // -----------------------------------------------------------------------
 
-bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap ) const
+bool FreetypeServerFont::GetGlyphBitmap8( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap ) const
 {
     if( maSizeFT )
         pFTActivateSize( maSizeFT );
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     FT_Int nLoadFlags = mnLoadFlags;
 
@@ -1597,7 +1597,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
     // => first we have to try without hinting
     if( (nLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP)) == 0 )
     {
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags|FT_LOAD_NO_HINTING );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags|FT_LOAD_NO_HINTING );
         if( (rc==FT_Err_Ok) && (maFaceFT->glyph->format != FT_GLYPH_FORMAT_BITMAP) )
             rc = -1; // mark as "loading embedded bitmap" was unsuccessful
         nLoadFlags |= FT_LOAD_NO_BITMAP;
@@ -1605,7 +1605,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
 
     if( rc != FT_Err_Ok )
 #endif
-        rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+        rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
 
     if( rc != FT_Err_Ok )
         return false;
@@ -2273,7 +2273,7 @@ static int FT_cubic_to( FT_Vector_CPtr p1, FT_Vector_CPtr p2, FT_Vector_CPtr p3,
 
 // -----------------------------------------------------------------------
 
-bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex,
+bool FreetypeServerFont::GetGlyphOutline( sal_GlyphId aGlyphId,
     ::basegfx::B2DPolyPolygon& rB2DPolyPoly ) const
 {
     if( maSizeFT )
@@ -2282,7 +2282,7 @@ bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex,
     rB2DPolyPoly.clear();
 
     int nGlyphFlags;
-    SplitGlyphFlags( *this, nGlyphIndex, nGlyphFlags );
+    SplitGlyphFlags( *this, aGlyphId, nGlyphFlags );
 
     FT_Int nLoadFlags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_TRANSFORM;
 
@@ -2292,7 +2292,7 @@ bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex,
         nLoadFlags |= FT_LOAD_TARGET_LIGHT;
 #endif
 
-    FT_Error rc = FT_Load_Glyph( maFaceFT, nGlyphIndex, nLoadFlags );
+    FT_Error rc = FT_Load_Glyph( maFaceFT, aGlyphId, nLoadFlags );
     if( rc != FT_Err_Ok )
         return false;
 
diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx
index eafa6db..a410521 100644
--- a/vcl/source/glyphs/gcach_ftyp.hxx
+++ b/vcl/source/glyphs/gcach_ftyp.hxx
@@ -184,14 +184,14 @@ public:
     virtual void                FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
     virtual const ImplFontCharMap* GetImplFontCharMap( void ) const;
 
-    virtual int                 GetGlyphIndex( sal_UCS4 ) const;
-    int                         GetRawGlyphIndex( sal_UCS4 ) const;
-    int                         FixupGlyphIndex( int nGlyphIndex, sal_UCS4 ) const;
+    virtual sal_GlyphId         GetGlyphIndex( sal_UCS4 ) const;
+    sal_GlyphId                 GetRawGlyphIndex( sal_UCS4 ) const;
+    sal_GlyphId                 FixupGlyphIndex( sal_GlyphId, sal_UCS4 ) const;
 
     virtual bool                GetAntialiasAdvice( void ) const;
-    virtual bool                GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
-    virtual bool                GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
-    virtual bool                GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const;
+    virtual bool                GetGlyphBitmap1( sal_GlyphId, RawBitmap& ) const;
+    virtual bool                GetGlyphBitmap8( sal_GlyphId, RawBitmap& ) const;
+    virtual bool                GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& ) const;
     virtual int                 GetGlyphKernValue( int nLeftGlyph, int nRightGlyph ) const;
     virtual sal_uLong               GetKernPairs( ImplKernPairData** ) const;
 
@@ -204,7 +204,7 @@ protected:
     friend class GlyphCache;
 
     int                         ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_*, bool ) const;
-    virtual void                InitGlyphData( int nGlyphIndex, GlyphData& ) const;
+    virtual void                InitGlyphData( sal_GlyphId, GlyphData& ) const;
     bool                        ApplyGSUB( const ImplFontSelectData& );
     virtual ServerFontLayoutEngine* GetLayoutEngine();
 
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index c5cbb74..97b0420 100644
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
@@ -99,7 +99,7 @@ bool ServerFontLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutAr
     FreetypeServerFont& rFont = static_cast<FreetypeServerFont&>(rLayout.GetServerFont());
 
     Point aNewPos( 0, 0 );
-    int nOldGlyphId = -1;
+    sal_GlyphId nOldGlyphId( GF_DROPPED);
     int nGlyphWidth = 0;
     GlyphItem aPrevItem;
     bool bRightToLeft;
@@ -116,9 +116,9 @@ bool ServerFontLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutAr
 
         if( bRightToLeft )
             cChar = GetMirroredChar( cChar );
-        int nGlyphIndex = rFont.GetGlyphIndex( cChar );
+        sal_GlyphId aGlyphId = rFont.GetGlyphIndex( cChar );
         // when glyph fallback is needed update LayoutArgs
-        if( !nGlyphIndex ) {
+        if( !aGlyphId ) {
             rArgs.NeedFallback( nCharPos, bRightToLeft );
         if( cChar >= 0x10000 ) // handle surrogate pairs
                 rArgs.NeedFallback( nCharPos+1, bRightToLeft );
@@ -127,26 +127,26 @@ bool ServerFontLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutAr
         // apply pair kerning to prev glyph if requested
         if( SAL_LAYOUT_KERNING_PAIRS & rArgs.mnFlags )
         {
-            int nKernValue = rFont.GetGlyphKernValue( nOldGlyphId, nGlyphIndex );
+            int nKernValue = rFont.GetGlyphKernValue( nOldGlyphId, aGlyphId );
             nGlyphWidth += nKernValue;
             aPrevItem.mnNewWidth = nGlyphWidth;
         }
 
         // finish previous glyph
-        if( nOldGlyphId >= 0 )
+        if( nOldGlyphId != GF_DROPPED )
             rLayout.AppendGlyph( aPrevItem );
         aNewPos.X() += nGlyphWidth;
 
         // prepare GlyphItem for appending it in next round
-        nOldGlyphId = nGlyphIndex;
-        const GlyphMetric& rGM = rFont.GetGlyphMetric( nGlyphIndex );
+        nOldGlyphId = aGlyphId;
+        const GlyphMetric& rGM = rFont.GetGlyphMetric( aGlyphId );
         nGlyphWidth = rGM.GetCharWidth();
         int nGlyphFlags = bRightToLeft ? GlyphItem::IS_RTL_GLYPH : 0;
-        aPrevItem = GlyphItem( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nGlyphWidth );
+        aPrevItem = GlyphItem( nCharPos, aGlyphId, aNewPos, nGlyphFlags, nGlyphWidth );
     }
 
     // append last glyph item if any
-    if( nOldGlyphId >= 0 )
+    if( nOldGlyphId != GF_DROPPED )
         rLayout.AppendGlyph( aPrevItem );
 
     return true;
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx
index 507e693..c22b7b4 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -384,9 +384,9 @@ void GlyphCache::GrowNotify()
 
 // -----------------------------------------------------------------------
 
-inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGlyphIndex )
+inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, sal_GlyphId aGlyphId )
 {
-    mrPeer.RemovingGlyph( rSF, rGD, nGlyphIndex );
+    mrPeer.RemovingGlyph( rSF, rGD, aGlyphId );
     mnBytesUsed -= sizeof( GlyphData );
     --mnGlyphCount;
 }
@@ -451,10 +451,10 @@ long ServerFont::Release() const
 
 // -----------------------------------------------------------------------
 
-GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
+GlyphData& ServerFont::GetGlyphData( sal_GlyphId aGlyphId )
 {
     // usually the GlyphData is cached
-    GlyphList::iterator it = maGlyphList.find( nGlyphIndex );
+    GlyphList::iterator it = maGlyphList.find( aGlyphId );
     if( it != maGlyphList.end() ) {
         GlyphData& rGlyphData = it->second;
         GlyphCache::GetInstance().UsingGlyph( *this, rGlyphData );
@@ -462,9 +462,9 @@ GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
     }
 
     // sometimes not => we need to create and initialize it ourselves
-    GlyphData& rGlyphData = maGlyphList[ nGlyphIndex ];
+    GlyphData& rGlyphData = maGlyphList[ aGlyphId ];
     mnBytesUsed += sizeof( GlyphData );
-    InitGlyphData( nGlyphIndex, rGlyphData );
+    InitGlyphData( aGlyphId, rGlyphData );
     GlyphCache::GetInstance().AddedGlyph( *this, rGlyphData );
     return rGlyphData;
 }
@@ -503,7 +503,7 @@ Point ServerFont::TransformPoint( const Point& rPoint ) const
     return Point( nX, nY );
 }
 
-bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
+bool ServerFont::IsGlyphInvisible( sal_GlyphId aGlyphId )
 {
     if (!mbCollectedZW)
     {
@@ -512,9 +512,9 @@ bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
         mbCollectedZW = true;
     }
 
-    if( !nGlyphIndex ) // don't hide the NotDef glyph
+    if( !aGlyphId ) // don't hide the NotDef glyph
         return false;
-    if( (nGlyphIndex == mnZWNJ) || (nGlyphIndex == mnZWJ) )
+    if( (aGlyphId == mnZWNJ) || (aGlyphId == mnZWJ) )
         return true;
 
     return false;
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index fe3b7daf..8231896 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -955,7 +955,7 @@ long GraphiteLayout::FillDXArray( sal_Int32* pDXArray ) const
             assert( (mvChar2BaseGlyph[i] == -1) ||
                 ((signed)(mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK) < (signed)mvGlyphs.size()));
             if (mvChar2BaseGlyph[i] != -1 &&
-                mvGlyphs[mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK].mnGlyphIndex == GF_DROPPED)
+                mvGlyphs[mvChar2BaseGlyph[i] & GLYPH_INDEX_MASK].maGlyphId == GF_DROPPED)
             {
                 // when used in MultiSalLayout::GetTextBreak dropped glyphs
                 // must have zero width
@@ -1165,7 +1165,7 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt
 #endif
             assert((nLastGlyph > -1) && (nLastGlyph < (signed)mvGlyphs.size()));
             mvGlyphs[nLastGlyph].mnNewWidth += nDWidth;
-            if (gi.mnGlyphIndex != GF_DROPPED)
+            if (gi.maGlyphId != GF_DROPPED)
                 mvGlyphs[nLastGlyph].mnNewWidth += nDWidth;
             else
                 nDGlyphOrigin += nDWidth;
@@ -1226,7 +1226,7 @@ void GraphiteLayout::kashidaJustify(std::vector<int>& rDeltaWidths, sal_GlyphId
             continue;
         }
         // no kashida-injection for blank justified expansion either
-        if( IsSpacingGlyph( (*i).mnGlyphIndex ) )
+        if( IsSpacingGlyph( (*i).maGlyphId ) )
         {
             ++i;
             continue;
@@ -1241,7 +1241,7 @@ void GraphiteLayout::kashidaJustify(std::vector<int>& rDeltaWidths, sal_GlyphId
         }
         nKashidaCount = 1 + (nGapWidth / nKashidaWidth);
 #ifdef GRLAYOUT_DEBUG
-        printf("inserting %d kashidas at %u\n", nKashidaCount, (*i).mnGlyphIndex);
+        printf("inserting %d kashidas at %u\n", nKashidaCount, (*i).maGlyphId);
 #endif
         GlyphItem glyphItem = *i;
         Point aPos(0, 0);
@@ -1296,7 +1296,7 @@ void GraphiteLayout::GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray
             int nChar2Base = mvChar2BaseGlyph[nCharSlot] & GLYPH_INDEX_MASK;
             assert((mvChar2BaseGlyph[nCharSlot] > -1) && (nChar2Base < (signed)mvGlyphs.size()));
             GlyphItem gi = mvGlyphs[nChar2Base];
-            if (gi.mnGlyphIndex == GF_DROPPED)
+            if (gi.maGlyphId == GF_DROPPED)
             {
                 continue;
             }
@@ -1412,7 +1412,7 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out,
   assert(glyph_slot >= 0);
   // Find the first glyph in the substring.
   for (; glyph_slot < signed(mvGlyphs.size()) &&
-          ((mvGlyphs.begin() + glyph_slot)->mnGlyphIndex == GF_DROPPED);
+          ((mvGlyphs.begin() + glyph_slot)->maGlyphId == GF_DROPPED);
           ++glyph_slot) {};
 
   // Update the length
@@ -1448,7 +1448,7 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out,
      }
      // Copy out this glyphs data.
      ++glyph_slot;
-     *glyph_out++ = glyph_itr->mnGlyphIndex;
+     *glyph_out++ = glyph_itr->maGlyphId;
 
      // Find the actual advance - this must be correct if called from
      // MultiSalLayout::AdjustLayout which requests one glyph at a time.
@@ -1477,13 +1477,13 @@ int GraphiteLayout::GetNextGlyphs( int length, sal_GlyphId * glyph_out,
        break;
 
      // Stop if glyph dropped
-     if (glyph_itr->mnGlyphIndex == GF_DROPPED)
+     if (glyph_itr->maGlyphId == GF_DROPPED)
        break;
   }
   int numGlyphs = glyph_slot - glyph_slot_begin;
   // move the next glyph_slot to a glyph that hasn't been dropped
   while (glyph_slot < static_cast<int>(mvGlyphs.size()) &&
-         (mvGlyphs.begin() + glyph_slot)->mnGlyphIndex == GF_DROPPED)
+         (mvGlyphs.begin() + glyph_slot)->maGlyphId == GF_DROPPED)
          ++glyph_slot;
   return numGlyphs;
 }
@@ -1495,7 +1495,7 @@ void GraphiteLayout::MoveGlyph( int nGlyphIndex, long nNewPos )
     // needs to be done carefully so the glyph/char maps are maintained
     // If a glyph has been dropped then it wasn't returned by GetNextGlyphs, so
     // the index here may be wrong
-    while ((mvGlyphs[nGlyphIndex].mnGlyphIndex == GF_DROPPED) &&
+    while ((mvGlyphs[nGlyphIndex].maGlyphId == GF_DROPPED) &&
            (nGlyphIndex < (signed)mvGlyphs.size()))
     {
         nGlyphIndex++;
@@ -1522,7 +1522,7 @@ void GraphiteLayout::DropGlyph( int nGlyphIndex )
         return;
 
     GlyphItem & glyph = mvGlyphs[nGlyphIndex];
-    glyph.mnGlyphIndex = GF_DROPPED;
+    glyph.maGlyphId = GF_DROPPED;
 #ifdef GRLAYOUT_DEBUG
     fprintf(grLog(),"Dropped %d\n", nGlyphIndex);
 #endif
@@ -1538,7 +1538,7 @@ void GraphiteLayout::Simplify( bool isBaseLayout )
   long deltaX = 0;
   while (gi != mvGlyphs.end())
   {
-      if (gi->mnGlyphIndex == dropMarker)
+      if (gi->maGlyphId == dropMarker)
       {
         deltaX += gi->mnNewWidth;
         gi->mnNewWidth = 0;
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index d070558..e511bf8 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -3626,7 +3626,7 @@ bool PrintFontManager::createFontSubset(
                                         FontSubsetInfo& rInfo,
                                         fontID nFont,
                                         const OUString& rOutFile,
-                                        sal_Int32* pGlyphIDs,
+                                        sal_GlyphId* pGlyphIds,
                                         sal_uInt8* pNewEncoding,
                                         sal_Int32* pWidths,
                                         int nGlyphs,
@@ -3666,11 +3666,11 @@ bool PrintFontManager::createFontSubset(
         }
         else
         {
-            DBG_ASSERT( !(pGlyphIDs[i] & 0x007f0000), "overlong glyph id" );
+            DBG_ASSERT( !(pGlyphIds[i] & 0x007f0000), "overlong glyph id" );
             DBG_ASSERT( (int)pNewEncoding[i] < nGlyphs, "encoding wrong" );
             DBG_ASSERT( pEnc[pNewEncoding[i]] == 0 && pGID[pNewEncoding[i]] == 0, "duplicate encoded glyph" );
             pEnc[ pNewEncoding[i] ] = pNewEncoding[i];
-            pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIDs[ i ];
+            pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIds[ i ];
             pOldIndex[ pNewEncoding[i] ] = i;
             nChar++;
         }
@@ -3700,9 +3700,9 @@ bool PrintFontManager::createFontSubset(
     {
         rInfo.LoadFont( FontSubsetInfo::CFF_FONT, pCffBytes, nCffLength );
 #if 1 // TODO: remove 16bit->long conversion when related methods handle non-16bit glyphids
-        long aRequestedGlyphs[256];
+        sal_GlyphId aRequestedGlyphIds[256];
         for( int i = 0; i < nGlyphs; ++i )
-            aRequestedGlyphs[i] = pGID[i];
+            aRequestedGlyphIds[i] = pGID[i];
 #endif
         // create subset file at requested path
         FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" );
@@ -3711,7 +3711,7 @@ bool PrintFontManager::createFontSubset(
         const bool bOK = rInfo.CreateFontSubset(
             FontSubsetInfo::TYPE1_PFB,
             pOutFile, pGlyphSetName,
-            aRequestedGlyphs, pEnc, nGlyphs, pWidths );
+            aRequestedGlyphIds, pEnc, nGlyphs, pWidths );
         fclose( pOutFile );
         // cleanup before early return
         CloseTTFont( pTTFont );
@@ -3820,9 +3820,9 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
                             break;
 #endif
                         // get the matching glyph index
-                        const sal_uInt32 nGlyphId = aCharMap.GetGlyphIndex( c );
+                        const sal_GlyphId aGlyphId = aCharMap.GetGlyphIndex( c );
                         // update the requested map
-                        rUnicodeEnc[ (sal_Unicode)c ] = nGlyphId;
+                        rUnicodeEnc[ (sal_Unicode)c ] = aGlyphId;
                     }
                 }
             }
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index de8b7d2..090de14 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -327,7 +327,7 @@ void X11GlyphPeer::RemovingFont( ServerFont& rServerFont )
 // ---------------------------------------------------------------------------
 
 // notification to clean up GlyphPeer resources for this glyph
-void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, int /*nGlyphIndex*/ )
+void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyphData, sal_GlyphId /*aGlyphId*/ )
 {
     // nothing to do if the GlyphPeer hasn't allocated resources for the glyph
     if( rGlyphData.ExtDataRef().meInfo == INFO_EMPTY )
@@ -364,8 +364,8 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph
                     mnBytesUsed -= nHeight * ((nWidth + 7) >> 3);
                 }
                 delete pMSGlyph->mpRawBitmap;
-                // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
-                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
+                // XRenderGlyph nXRGlyph = (XRenderGlyph)rGlyphData.GetExtPointer();
+                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nXRGlyph );
                 delete[] pMSGlyph; // it was allocated with new char[]
             }
             break;
@@ -384,8 +384,8 @@ void X11GlyphPeer::RemovingGlyph( ServerFont& /*rServerFont*/, GlyphData& rGlyph
 
         case INFO_XRENDER:
             {
-                // Glyph nGlyphId = (Glyph)rGlyphData.GetExtPointer();
-                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nGlyphId );
+                // XRenderGlyph nXRGlyph = (XRenderGlyph)rGlyphData.GetExtPointer();
+                // XRenderPeer::GetInstance().FreeGlyph( aGlyphSet, &nXRGlyph );
                 mnBytesUsed -= nHeight * ((nWidth + 3) & ~3);
             }
             break;
@@ -449,17 +449,17 @@ GlyphSet X11GlyphPeer::GetGlyphSet( ServerFont& rServerFont, int nScreen )
 
 // ---------------------------------------------------------------------------
 
-Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nReqScreen )
+Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, sal_GlyphId aGlyphId, int nReqScreen )
 {
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
+    if( rServerFont.IsGlyphInvisible( aGlyphId ) )
         return None;
 
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
     Pixmap aPixmap = GetPixmap( rGlyphData, nReqScreen );
     if( aPixmap == NO_PIXMAP )
     {
         aPixmap = None;
-        if( rServerFont.GetGlyphBitmap1( nGlyphIndex, maRawBitmap ) )
+        if( rServerFont.GetGlyphBitmap1( aGlyphId, maRawBitmap ) )
         {
             // #94666# circumvent bug in some X11 systems, e.g. XF410.LynxEM.v163
             sal_uLong nPixmapWidth = 8 * maRawBitmap.mnScanlineSize - 1;
@@ -541,7 +541,7 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nR
         else
         {
             // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
+            if( aGlyphId != 0 )  // recurse only once
                 aPixmap = GetPixmap( rServerFont, 0, nReqScreen );
 
             if( aPixmap == NO_PIXMAP )
@@ -554,19 +554,18 @@ Pixmap X11GlyphPeer::GetPixmap( ServerFont& rServerFont, int nGlyphIndex, int nR
 
 // ---------------------------------------------------------------------------
 
-const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
-    int nGlyphIndex )
+const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont, sal_GlyphId aGlyphId )
 {
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
+    if( rServerFont.IsGlyphInvisible( aGlyphId ) )
         return NO_RAWBMP;
 
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
 
     const RawBitmap* pRawBitmap = GetRawBitmap( rGlyphData );
     if( pRawBitmap == NO_RAWBMP )
     {
         RawBitmap* pNewBitmap = new RawBitmap;
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, *pNewBitmap ) )
+        if( rServerFont.GetGlyphBitmap8( aGlyphId, *pNewBitmap ) )
         {
             pRawBitmap = pNewBitmap;
             mnBytesUsed += pNewBitmap->mnScanlineSize * pNewBitmap->mnHeight;
@@ -576,7 +575,7 @@ const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
         {
             delete pNewBitmap;
             // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
+            if( aGlyphId != 0 )  // recurse only once
                 pRawBitmap = GetRawBitmap( rServerFont, 0 );
         }
 
@@ -588,18 +587,18 @@ const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont,
 
 // ---------------------------------------------------------------------------
 
-Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
+XRenderGlyph X11GlyphPeer::GetXRGlyph( ServerFont& rServerFont, sal_GlyphId aGlyphId )
 {
-    if( rServerFont.IsGlyphInvisible( nGlyphIndex ) )
+    if( rServerFont.IsGlyphInvisible( aGlyphId ) )
         return NO_GLYPHID;
 
-    GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex );
+    GlyphData& rGlyphData = rServerFont.GetGlyphData( aGlyphId );
 
-    Glyph aGlyphId = GetRenderGlyph( rGlyphData );
-    if( aGlyphId == NO_GLYPHID )
+    XRenderGlyph nXRGlyph = GetRenderGlyph( rGlyphData );
+    if( nXRGlyph == NO_GLYPHID )
     {
         // prepare GlyphInfo and Bitmap
-        if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) )
+        if( rServerFont.GetGlyphBitmap8( aGlyphId, maRawBitmap ) )
         {
             XGlyphInfo aGlyphInfo;
             aGlyphInfo.width    = maRawBitmap.mnWidth;
@@ -617,23 +616,23 @@ Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex )
             // upload glyph bitmap to server
             GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 );
 
-            aGlyphId = nGlyphIndex & 0x00FFFFFF;
+            nXRGlyph = aGlyphId & 0x00FFFFFF;
             const sal_uLong nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight;
-            XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId,
+            XRenderPeer::GetInstance().AddGlyph( aGlyphSet, nXRGlyph,
                 aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes );
             mnBytesUsed += nBytes;
         }
         else
         {
             // fall back to .notdef glyph
-            if( nGlyphIndex != 0 )  // recurse only once
-                aGlyphId = GetGlyphId( rServerFont, 0 );
+            if( nXRGlyph != 0 )  // recurse only once
+                nXRGlyph = GetXRGlyph( rServerFont, 0 );
         }
 
-        SetRenderGlyph( rGlyphData, aGlyphId );
+        SetRenderGlyph( rGlyphData, nXRGlyph );
     }
 
-    return aGlyphId;
+    return nXRGlyph;
 }
 
 // ===========================================================================
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index 336a096..51806c6 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -32,6 +32,7 @@
 
 class SalDisplay;
 struct MultiScreenGlyph;
+typedef Glyph XRenderGlyph;
 
 class X11GlyphPeer
 : public GlyphCachePeer
@@ -40,24 +41,24 @@ public:
                         X11GlyphPeer();
     virtual            ~X11GlyphPeer();
 
-    Pixmap              GetPixmap( ServerFont&, int nGlyphIndex, int nScreen );
-    const RawBitmap*    GetRawBitmap( ServerFont&, int nGlyphIndex );
+    Pixmap              GetPixmap( ServerFont&, sal_GlyphId, int nScreen );
+    const RawBitmap*    GetRawBitmap( ServerFont&, sal_GlyphId );
     bool                ForcedAntialiasing( const ServerFont&, int nScreen ) const;
 
     GlyphSet            GetGlyphSet( ServerFont&, int nScreen );
-    Glyph               GetGlyphId( ServerFont&, int nGlyphIndex );
+    XRenderGlyph        GetXRGlyph( ServerFont&, sal_GlyphId );
 
 protected:
     void                InitAntialiasing();
 
     virtual void        RemovingFont( ServerFont& );
-    virtual void        RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex );
+    virtual void        RemovingGlyph( ServerFont&, GlyphData&, sal_GlyphId );
 
     MultiScreenGlyph*   PrepareForMultiscreen( ExtGlyphData& ) const;
     void                SetRenderGlyph( GlyphData&, Glyph ) const;
     void                SetRawBitmap( GlyphData&, const RawBitmap* ) const;
     void                SetPixmap( GlyphData&, Pixmap, int nScreen ) const;
-    Glyph               GetRenderGlyph( const GlyphData& ) const;
+    XRenderGlyph        GetRenderGlyph( const GlyphData& ) const;
     const RawBitmap*    GetRawBitmap( const GlyphData& ) const;
     Pixmap              GetPixmap( const GlyphData&, int nScreen ) const;
 
diff --git a/vcl/unx/generic/gdi/pspgraphics.cxx b/vcl/unx/generic/gdi/pspgraphics.cxx
index 0d77cf4..d609182 100644
--- a/vcl/unx/generic/gdi/pspgraphics.cxx
+++ b/vcl/unx/generic/gdi/pspgraphics.cxx
@@ -603,7 +603,7 @@ bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs )
     mbVertical = ((rArgs.mnFlags & SAL_LAYOUT_VERTICAL) != 0);
 
     long nUnitsPerPixel = 1;
-    int nOldGlyphId = -1;
+    sal_GlyphId aOldGlyphId( GF_DROPPED);
     long nGlyphWidth = 0;
     int nCharPos = -1;
     Point aNewPos( 0, 0 );
@@ -622,7 +622,7 @@ bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs )
         if( aFontEnc == RTL_TEXTENCODING_SYMBOL )
             if( cChar < 256 )
                 cChar += 0xf000;
-        int nGlyphIndex = cChar;  // printer glyphs = unicode
+        sal_GlyphId aGlyphId( cChar);  // printer glyphs = unicode
 
         // update fallback_runs if needed
         psp::CharacterMetric aMetric;
@@ -633,13 +633,13 @@ bool PspFontLayout::LayoutText( ImplLayoutArgs& rArgs )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list