26#include <vcl/font.hxx>
34#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
35#include <com/sun/star/i18n/XBreakIterator.hpp>
42 maObjects(
std::move(rObjects) ),
74 return(
maGlyphTree[ aFontName.getToken( 0,
';' ) ][ eWeight ][ eItalic ] );
82 pVDev->EnableOutput(
false );
86 if( elem.HasRepresentation() )
100 case MetaActionType::TEXT:
103 sal_Int32 aLength=std::min( pA->
GetText().getLength(), pA->
GetLen() );
108 case MetaActionType::TEXTRECT:
115 case MetaActionType::TEXTARRAY:
118 sal_Int32 aLength=std::min( pA->
GetText().getLength(), pA->
GetLen() );
123 case MetaActionType::STRETCHTEXT:
126 sal_Int32 aLength=std::min( pA->
GetText().getLength(), pA->
GetLen() );
136 if( !aText.isEmpty() )
139 css::uno::Reference< css::i18n::XBreakIterator > xBI(
145 sal_Int32 nCurPos = 0, nLastPos = -1;
147 while( ( nCurPos < aText.getLength() ) && ( nCurPos > nLastPos ) )
149 sal_Int32 nCount2 = 1;
152 nCurPos = xBI->nextCharacters( aText, nCurPos, rLocale,
153 css::i18n::CharacterIteratorMode::SKIPCELL,
156 rGlyphSet.insert( aText.copy( nLastPos, nCurPos - nLastPos ) );
163 for( sal_uInt32 k = 0, nLen = aText.getLength(); k < nLen; ++k )
164 rGlyphSet.insert( OUString( pStr[ k ] ) );
182 if( rGlyphSet.empty() )
187 OUString aCurIdStr(
"EmbeddedFont_" );
188 OUString aUnitsPerEM( OUString::number(
nFontEM ) );
195 pVDev->SetMapMode(
MapMode(MapUnit::Map100thMM));
196 pVDev->SetFont( aFont );
204 OUString aFontWeight;
210 aFontWeight =
"bold";
212 aFontWeight =
"normal";
216 aFontStyle =
"italic";
218 aFontStyle =
"normal";
243 for (
auto const& glyph : rGlyphSet)
262 aPolyPoly.
Scale( 1.0, -1.0 );
269 if( rCellStr[ 0 ] == nSpace && rCellStr.getLength() == 1 )
275 if( !aPathString.isEmpty() )
293 for (
auto const& fontWeight : rFontWeightMap)
296 for (
auto const& fontItalic : rFontItalicMap)
const LanguageTag & GetLanguageTag() const
static const AllSettings & GetSettings()
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
sal_Int32 GetIndex() const
const OUString & GetText() const
const OUString & GetText() const
sal_Int32 GetIndex() const
sal_Int32 GetIndex() const
const OUString & GetText() const
const OUString & GetText() const
bool GetTextOutline(tools::PolyPolygon &, const OUString &rStr) const
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
static OUString GetPathString(const tools::PolyPolygon &rPolyPoly, bool bLine)
bool IsEmbedFonts() const
::std::map< FontItalic, GlyphSet > FontItalicMap
SVGFontExport(SVGExport &rExport, ::std::vector< ObjectRepresentation > &&rObjects)
GlyphSet & implGetGlyphSet(const vcl::Font &rFont)
::std::set< OUString, ::std::greater< OUString > > GlyphSet
::std::map< FontWeight, FontItalicMap > FontWeightMap
OUString GetMappedFontName(std::u16string_view rFontName) const
void implEmbedGlyph(OutputDevice const &rOut, const OUString &rCellStr)
void implEmbedFont(const vcl::Font &rFont)
constexpr tools::Long Width() const
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
void SetFontSize(const Size &)
void SetItalic(FontItalic)
void SetWeight(FontWeight)
const OUString & GetFamilyName() const
void SetAlignment(TextAlign)
void SetFamilyName(const OUString &rFamilyName)
const sal_uInt16 XML_NAMESPACE_NONE
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
VCL_DLLPUBLIC css::uno::Reference< css::i18n::XBreakIterator > CreateBreakIterator()