summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset/sft.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-10-21 11:56:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-10-22 08:29:54 +0200
commita3c7d78f3dc5ccce60dc198d2466ec7470f7fe9c (patch)
tree90fafc65d3f560d6266c817042b91b744dfec004 /vcl/source/fontsubset/sft.cxx
parentdb8f0528eb71252b4af9c3f7ec213ea7fb29591a (diff)
loplugin:unusedmethods
Change-Id: I3c94d68cb85adc2005a5a5e3b03a311732f782c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/fontsubset/sft.cxx')
-rw-r--r--vcl/source/fontsubset/sft.cxx43
1 files changed, 0 insertions, 43 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 3bf3beac9080..9a9d5fc34a96 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2177,49 +2177,6 @@ SFErrCodes CreateT42FromTTGlyphs(TrueTypeFont *ttf,
return SFErrCodes::Ok;
}
-std::unique_ptr<sal_uInt16[]> GetTTSimpleGlyphMetrics(AbstractTrueTypeFont const *ttf, const sal_uInt16 *glyphArray, int nGlyphs, bool vertical)
-{
- const sal_uInt8* pTable;
- sal_uInt32 n;
- sal_uInt32 nTableSize;
-
- if (!vertical)
- {
- n = ttf->horzMetricCount();
- pTable = ttf->table(O_hmtx, nTableSize);
- }
- else
- {
- n = ttf->vertMetricCount();
- pTable = ttf->table(O_vmtx, nTableSize);
- }
-
- if (!nGlyphs || !glyphArray) return nullptr; /* invalid parameters */
- if (!n || !pTable) return nullptr; /* the font does not contain the requested metrics */
-
- std::unique_ptr<sal_uInt16[]> res(new sal_uInt16[nGlyphs]);
-
- const int UPEm = ttf->unitsPerEm();
- for( int i = 0; i < nGlyphs; ++i) {
- sal_uInt32 nAdvOffset;
- sal_uInt16 glyphID = glyphArray[i];
-
- if (glyphID < n) {
- nAdvOffset = 4 * glyphID;
- } else {
- nAdvOffset = 4 * (n - 1);
- }
-
- if (nAdvOffset >= nTableSize || UPEm == 0)
- res[i] = 0; /* better than a crash for buggy fonts */
- else
- res[i] = static_cast<sal_uInt16>(
- XUnits( UPEm, GetUInt16( pTable, nAdvOffset) ) );
- }
-
- return res;
-}
-
bool GetTTGlobalFontHeadInfo(const AbstractTrueTypeFont *ttf, int& xMin, int& yMin, int& xMax, int& yMax, sal_uInt16& macStyle)
{
sal_uInt32 table_size;