$73 GRAYBYTE WORDPRESS FILE MANAGER $13

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/libicu/usr/share/doc/alt-libicu-devel/samples/layout/

HOME
Current File : /opt/alt/libicu/usr/share/doc/alt-libicu-devel/samples/layout//ScriptCompositeFontInstance.h
/*
 * %W% %E%
 *
 * © 2016 and later: Unicode, Inc. and others.
 * License & terms of use: http://www.unicode.org/copyright.html#License
 *
 * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
 *
 */

#ifndef __SCRIPTCOMPOSITEFONTINSTANCE_H
#define __SCRIPTCOMPOSITEFONTINSTANCE_H

#include "layout/LETypes.h"
#include "layout/LEFontInstance.h"

#include "FontMap.h"

// U_NAMESPACE_BEGIN

class ScriptCompositeFontInstance : public LEFontInstance
{
public:

    ScriptCompositeFontInstance(FontMap *fontMap);

    virtual ~ScriptCompositeFontInstance();

      /**
     * Get a physical font which can render the given text. For composite fonts,
     * if there is no single physical font which can render all of the text,
     * return a physical font which can render an initial substring of the text,
     * and set the <code>offset</code> parameter to the end of that substring.
     *
     * Internally, the LayoutEngine works with runs of text all in the same
     * font and script, so it is best to call this method with text which is
     * in a single script, passing the script code in as a hint. If you don't
     * know the script of the text, you can use zero, which is the script code
     * for characters used in more than one script.
     *
     * The default implementation of this method is intended for instances of
     * <code>LEFontInstance</code> which represent a physical font. It returns
     * <code>this</code> and indicates that the entire string can be rendered.
     *
     * This method will return a valid <code>LEFontInstance</code> unless you
     * have passed illegal parameters, or an internal error has been encountered. 
     * For composite fonts, it may return the warning <code>LE_NO_SUBFONT_WARNING</code>
     * to indicate that the returned font may not be able to render all of
     * the text. Whenever a valid font is returned, the <code>offset</code> parameter
     * will be advanced by at least one.
     *
     * Subclasses which implement composite fonts must override this method.
     * Where it makes sense, they should use the script code as a hint to render
     * characters from the COMMON script in the font which is used for the given
     * script. For example, if the input text is a series of Arabic words separated
     * by spaces, and the script code passed in is <code>arabScriptCode</code> you
     * should return the font used for Arabic characters for all of the input text,
     * including the spaces. If, on the other hand, the input text contains characters
     * which cannot be rendered by the font used for Arabic characters, but which can
     * be rendered by another font, you should return that font for those characters.
     *
     * @param chars   - the array of Unicode characters.
     * @param offset  - a pointer to the starting offset in the text. On exit this
     *                  will be set the the limit offset of the text which can be
     *                  rendered using the returned font.
     * @param limit   - the limit offset for the input text.
     * @param script  - the script hint.
     * @param success - set to an error code if the arguments are illegal, or no font
     *                  can be returned for some reason. May also be set to
     *                  <code>LE_NO_SUBFONT_WARNING</code> if the subfont which
     *                  was returned cannot render all of the text.
     *
     * @return an <code>LEFontInstance</code> for the sub font which can render the characters, or
     *         <code>NULL</code> if there is an error.
     *
     * @see LEScripts.h
     */
    virtual const LEFontInstance *getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit, le_int32 script, LEErrorCode &success) const;

    /**
     * This method maps a single character to a glyph index, using the
     * font's charcter to glyph map.
     *
     * @param ch - the character
     *
     * @return the glyph index
     */
    virtual LEGlyphID mapCharToGlyph(LEUnicode32 ch) const;

    virtual const void *getFontTable(LETag tableTag) const;

    virtual le_int32 getUnitsPerEM() const;

    virtual le_int32 getAscent() const;

    virtual le_int32 getDescent() const;

    virtual le_int32 getLeading() const;

    virtual void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;

    virtual le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;

    float getXPixelsPerEm() const;

    float getYPixelsPerEm() const;

    float getScaleFactorX() const;

    float getScaleFactorY() const;

    /**
     * ICU "poor man's RTTI", returns a UClassID for the actual class.
     */
    virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }

    /**
     * ICU "poor man's RTTI", returns a UClassID for this class.
     */
    static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }

protected:
    FontMap *fFontMap;

private:

    /**
     * The address of this static class variable serves as this class's ID
     * for ICU "poor man's RTTI".
     */
    static const char fgClassID;
};

inline const void *ScriptCompositeFontInstance::getFontTable(LETag /*tableTag*/) const
{
    return NULL;
}

// Can't get units per EM without knowing which sub-font, so
// return a value that will make units == points
inline le_int32 ScriptCompositeFontInstance::getUnitsPerEM() const
{
    return 1;
}

inline le_int32 ScriptCompositeFontInstance::getAscent() const
{
    return fFontMap->getAscent();
}

inline le_int32 ScriptCompositeFontInstance::getDescent() const
{
    return fFontMap->getDescent();
}

inline le_int32 ScriptCompositeFontInstance::getLeading() const
{
    return fFontMap->getLeading();
}

inline float ScriptCompositeFontInstance::getXPixelsPerEm() const
{
    return fFontMap->getPointSize();
}

inline float ScriptCompositeFontInstance::getYPixelsPerEm() const
{
    return fFontMap->getPointSize();
}

// Can't get a scale factor without knowing the sub-font, so
// return 1.0.
inline float ScriptCompositeFontInstance::getScaleFactorX() const
{
    return 1.0;
}

// Can't get a scale factor without knowing the sub-font, so
// return 1.0
inline float ScriptCompositeFontInstance::getScaleFactorY() const
{
    return 1.0;
}

// U_NAMESPACE_END
#endif


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.40 PM
root / root
0755
FontMap.GDI
0.416 KB
17 Apr 2019 7.42 PM
root / root
0644
FontMap.Gnome
0.383 KB
17 Apr 2019 7.42 PM
root / root
0644
FontMap.cpp
7.341 KB
17 Apr 2019 7.42 PM
root / root
0644
FontMap.h
1.843 KB
17 Apr 2019 7.42 PM
root / root
0644
FontTableCache.cpp
2.37 KB
17 Apr 2019 7.42 PM
root / root
0644
FontTableCache.h
1.063 KB
17 Apr 2019 7.42 PM
root / root
0644
GDIFontInstance.cpp
9.596 KB
17 Apr 2019 7.42 PM
root / root
0644
GDIFontInstance.h
3.602 KB
17 Apr 2019 7.42 PM
root / root
0644
GDIFontMap.cpp
1.324 KB
17 Apr 2019 7.42 PM
root / root
0644
GDIFontMap.h
1.232 KB
17 Apr 2019 7.42 PM
root / root
0644
GDIGUISupport.cpp
0.842 KB
17 Apr 2019 7.42 PM
root / root
0644
GDIGUISupport.h
0.927 KB
17 Apr 2019 7.42 PM
root / root
0644
GUISupport.h
0.869 KB
17 Apr 2019 7.42 PM
root / root
0644
GnomeFontInstance.cpp
5.427 KB
17 Apr 2019 7.42 PM
root / root
0644
GnomeFontInstance.h
3.789 KB
17 Apr 2019 7.42 PM
root / root
0644
GnomeFontMap.cpp
1.394 KB
17 Apr 2019 7.42 PM
root / root
0644
GnomeFontMap.h
1.211 KB
17 Apr 2019 7.42 PM
root / root
0644
GnomeGUISupport.cpp
1.049 KB
17 Apr 2019 7.42 PM
root / root
0644
GnomeGUISupport.h
0.938 KB
17 Apr 2019 7.42 PM
root / root
0644
LayoutSample.rc
3.369 KB
17 Apr 2019 7.42 PM
root / root
0644
Makefile
2.918 KB
7 Nov 2019 6.56 AM
root / root
0644
Makefile.in
2.921 KB
17 Apr 2019 7.42 PM
root / root
0644
RenderingSurface.h
1.093 KB
17 Apr 2019 7.42 PM
root / root
0644
Sample.txt
1.657 KB
17 Apr 2019 7.42 PM
root / root
0644
ScriptCompositeFontInstance.cpp
3.197 KB
17 Apr 2019 7.42 PM
root / root
0644
ScriptCompositeFontInstance.h
6.154 KB
17 Apr 2019 7.42 PM
root / root
0644
Surface.cpp
0.871 KB
17 Apr 2019 7.42 PM
root / root
0644
Surface.h
0.507 KB
17 Apr 2019 7.42 PM
root / root
0644
UnicodeReader.cpp
4.104 KB
17 Apr 2019 7.42 PM
root / root
0644
UnicodeReader.h
0.976 KB
17 Apr 2019 7.42 PM
root / root
0644
arraymem.h
0.631 KB
17 Apr 2019 7.42 PM
root / root
0644
cgnomelayout.c
8.445 KB
17 Apr 2019 7.42 PM
root / root
0644
clayout.c
9.824 KB
17 Apr 2019 7.42 PM
root / root
0644
cmaps.cpp
5.301 KB
17 Apr 2019 7.42 PM
root / root
0644
cmaps.h
2.057 KB
17 Apr 2019 7.42 PM
root / root
0644
gdiglue.cpp
1.667 KB
17 Apr 2019 7.42 PM
root / root
0644
gdiglue.h
0.96 KB
17 Apr 2019 7.42 PM
root / root
0644
gnomeglue.cpp
1.643 KB
17 Apr 2019 7.42 PM
root / root
0644
gnomeglue.h
0.963 KB
17 Apr 2019 7.42 PM
root / root
0644
gnomelayout.cpp
8.497 KB
17 Apr 2019 7.42 PM
root / root
0644
gsupport.h
0.361 KB
17 Apr 2019 7.42 PM
root / root
0644
layout.cpp
9.797 KB
17 Apr 2019 7.42 PM
root / root
0644
layout.sln
1.174 KB
17 Apr 2019 7.42 PM
root / root
0644
layout.vcxproj
13.154 KB
17 Apr 2019 7.42 PM
root / root
0644
layout.vcxproj.filters
3.059 KB
17 Apr 2019 7.42 PM
root / root
0644
paragraph.cpp
7.583 KB
17 Apr 2019 7.42 PM
root / root
0644
paragraph.h
2.18 KB
17 Apr 2019 7.42 PM
root / root
0644
pflow.c
9.268 KB
17 Apr 2019 7.42 PM
root / root
0644
pflow.h
0.918 KB
17 Apr 2019 7.42 PM
root / root
0644
readme.html
7.324 KB
17 Apr 2019 7.42 PM
root / root
0644
resource.h
0.886 KB
17 Apr 2019 7.42 PM
root / root
0644
rsurface.cpp
0.695 KB
17 Apr 2019 7.42 PM
root / root
0644
rsurface.h
0.516 KB
17 Apr 2019 7.42 PM
root / root
0644
sfnt.h
4.903 KB
17 Apr 2019 7.42 PM
root / root
0644
ucreader.cpp
0.497 KB
17 Apr 2019 7.42 PM
root / root
0644
ucreader.h
0.412 KB
17 Apr 2019 7.42 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF