summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_font_main.c
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-07-06 12:43:40 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-06 12:43:40 +0100
commit972cd7f62bbfaa03d3b25ea1e8ba643de24cf7b9 (patch)
tree9e742b7c0fab370172e1eec4f806e044996e5982 /src/lib/evas/common/evas_font_main.c
parente561bb6980e0a5e6c2674b0e380dbbd6a7b62e4d (diff)
evas_text: lazy loading color glyph images in RAM
Summary: Lazy loading for glyph images into RAM, instead of caching at layout level we will cache only when rendering. This may affect speed a bit since color glyphs will be loaded twice before caching (with FT_Load_Glyph) Try to run test application, and hit `scale font` ** RAM consumption (Accelerated Rendering) ** | Before | After | |-------:|-------| | 111.9 | 21.8 | | 204.8 | 24.4 | | 298.0 | 26.3 | | 391.5 | 28.4 | | 484.8 | 29.9 | | 578.1 | 31.4 | | 671.4 | 32.5 | ** RAM consumption (SW Rendering) ** | Before | After | |-------:|-------| | 104 | 14.6 | | 197 | 17 | | 290 | 19.1 | | 384 | 21.2 | | 477 | 22.8 | | 571 | 24.3 | | 664 | 25.6 | Test Plan: ``` #include <Elementary.h> typedef struct _APP { Evas_Object *tb1; Evas_Object *btnLoad; } APP; char *text = "<align=center><color=#4DE0FFFF underline=on underline_color=#4DE0FFFF><a href='tel:1234567890'>1234567890</a></color>๐Ÿ˜€๐Ÿ˜๐Ÿ˜‚๐Ÿคฃ๐Ÿ˜ƒ๐Ÿ˜„๐Ÿ˜…๐Ÿ˜†๐Ÿ˜‰๐Ÿ˜Š๐Ÿ˜‹๐Ÿ˜Ž๐Ÿ˜๐Ÿ˜˜๐Ÿ˜—๐Ÿ˜™๐Ÿ˜šโ˜บ๐Ÿ™‚๐Ÿค—๐Ÿค”๐Ÿ˜๐Ÿ˜‘๐Ÿ˜ถ๐Ÿ™„๐Ÿ˜๐Ÿ˜ฃ๐Ÿ˜ฅ๐Ÿ˜ฎ๐Ÿค๐Ÿ˜ฏ๐Ÿ˜ช๐Ÿ˜ซ๐Ÿ˜ด๐Ÿ˜Œ๐Ÿค“๐Ÿ˜›๐Ÿ˜œ๐Ÿ˜๐Ÿคค๐Ÿ˜’๐Ÿ˜“๐Ÿ˜”๐Ÿ˜•๐Ÿ™ƒ๐Ÿค‘๐Ÿ˜ฒโ˜น๐Ÿ™๐Ÿ˜–๐Ÿ˜ž๐Ÿ˜Ÿ๐Ÿ˜ค๐Ÿ˜ข๐Ÿ˜ญ๐Ÿ˜ฆ๐Ÿ˜ง๐Ÿ˜จ๐Ÿ˜ฉ๐Ÿ˜ฌ๐Ÿ˜ฐ๐Ÿ˜ฑ๐Ÿ˜ณ๐Ÿ˜ต๐Ÿ˜ก๐Ÿ˜ ๐Ÿ˜‡๐Ÿค ๐Ÿคก๐Ÿคฅ๐Ÿ˜ท๐Ÿค’๐Ÿค•๐Ÿคข๐Ÿคงโ˜ป๐Ÿ˜ˆ๐Ÿ‘ฟ๐Ÿ‘น๐Ÿ‘บ๐Ÿ’€โ˜ ๐Ÿ‘ป๐Ÿ‘ฝ๐Ÿ‘พ๐Ÿค–๐Ÿ’ฉ๐Ÿ˜บ๐Ÿ˜ธ๐Ÿ˜น๐Ÿ˜ป๐Ÿ˜ผ๐Ÿ˜ฝ๐Ÿ™€๐Ÿ˜ฟ๐Ÿ˜พ๐Ÿ™ˆ๐Ÿ™‰๐Ÿ™Š๐Ÿ‘ฆ๐Ÿ‘ง๐Ÿ‘จ๐Ÿ‘ฉ๐Ÿ‘ต๐Ÿ‘ถ๐Ÿ‘ผ๐Ÿ‘จโ€โš•๏ธ๐Ÿ‘ฉโ€โš•๏ธ๐Ÿ‘จโ€๐ŸŽ“๐Ÿ‘ฉโ€๐ŸŽ“๐Ÿ‘จโ€๐Ÿซ๐Ÿ‘ฉโ€๐Ÿซ๐Ÿ‘จโ€โš–๐Ÿ‘ฉโ€โš–๐Ÿ‘จโ€๐ŸŒพ๐Ÿ‘ฉโ€๐ŸŒพ๐Ÿ‘จโ€๐Ÿณ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿ‘จโ€๐Ÿ”ง๐Ÿ‘ฉโ€๐Ÿ”ง๐Ÿ‘จโ€๐Ÿญ๐Ÿ‘ฉโ€๐Ÿญ๐Ÿ‘จโ€๐Ÿ’ผ๐Ÿ‘ฉโ€๐Ÿ’ผ๐Ÿ‘จโ€๐Ÿ”ฌ๐Ÿ‘ฉโ€๐Ÿ”ฌ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐ŸŽค๐Ÿ‘ฉโ€๐ŸŽค๐Ÿ‘จโ€๐ŸŽจ๐Ÿ‘ฉโ€๐ŸŽจ๐Ÿ‘จโ€โœˆ๏ธ๐Ÿ‘ฉโ€โœˆ๏ธ๐Ÿ‘จโ€๐Ÿš€๐Ÿ‘ฉโ€๐Ÿš€๐Ÿ‘จโ€๐Ÿš’๐Ÿ‘ฉโ€๐Ÿš’๐Ÿ‘ฎโ€โ™‚๏ธ๐Ÿ‘ฎโ€โ™€๏ธ๐Ÿ•ต๏ธโ€โ™‚๏ธ๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿ’‚โ€โ™‚๏ธ๐Ÿ’‚โ€โ™€๏ธ๐Ÿ‘ทโ€โ™‚๏ธ๐Ÿ‘ทโ€โ™€๏ธ๐Ÿ‘ณโ€โ™‚๏ธ๐Ÿ‘ณโ€โ™€๏ธ๐Ÿ‘ฑโ€โ™‚๏ธ๐Ÿ‘ฑโ€โ™€๏ธ๐ŸŽ…๐Ÿคถ๐Ÿ‘ธ๐Ÿคด๐Ÿ‘ฐ๐Ÿคต๐Ÿคฐ๐Ÿ‘ฒ๐Ÿ™โ€โ™‚๏ธ๐Ÿ™โ€โ™€๏ธ๐Ÿ™Žโ€โ™‚๏ธ๐Ÿ™Žโ€โ™€๏ธ๐Ÿ™…โ€โ™‚๏ธ๐Ÿ™…โ€โ™€๏ธ๐Ÿ™†โ€โ™‚๏ธ๐Ÿ™†โ€โ™€๏ธ๐Ÿ’โ€โ™‚๏ธ๐Ÿ’โ€โ™€๏ธ๐Ÿ™‹โ€โ™‚๏ธ๐Ÿ™‹โ€โ™€๏ธ๐Ÿ™‡โ€โ™‚๏ธ๐Ÿ™‡โ€โ™€๏ธ๐Ÿคฆโ€โ™‚๏ธ๐Ÿคฆโ€โ™€๏ธ๐Ÿคทโ€โ™‚๏ธ๐Ÿคทโ€โ™€๏ธ๐Ÿ’†โ€โ™‚๏ธ๐Ÿ’†โ€โ™€๏ธ๐Ÿ’‡โ€โ™‚๏ธ๐Ÿ’‡โ€โ™€๏ธ๐Ÿšถโ€โ™‚๏ธ๐Ÿšถโ€โ™€๏ธ๐Ÿƒโ€โ™‚๏ธ๐Ÿƒโ€โ™€๏ธ๐Ÿ’ƒ๐Ÿ•บ๐Ÿ‘ฏโ€โ™‚๏ธ๐Ÿ‘ฏโ€โ™€๏ธ๐Ÿ•ด๐Ÿ—ฃ๐Ÿ‘ค๐Ÿ‘ฅ๐Ÿ‘ซ๐Ÿ‘ฌ๐Ÿ‘ญ๐Ÿ’๐Ÿ’‘๐Ÿ‘ช๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘ง๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ‘ฉโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘ง๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง๐Ÿ’ช๐Ÿคณ๐Ÿ‘ˆ๐Ÿ‘‰โ˜๏ธ๐Ÿ‘†๐Ÿ–•๐Ÿ‘‡โœŒ๐Ÿคž๐Ÿ––๐Ÿค˜๐Ÿ‘Š๐Ÿ–โœ‹๐Ÿ‘Œ๐Ÿ‘๐Ÿ‘ŽโœŠ๐Ÿ‘Š๐Ÿค›๐Ÿคœ๐Ÿคš๐Ÿ‘‹๐Ÿ‘โœ๐Ÿ‘๐Ÿ™Œ๐Ÿ™๐Ÿค๐Ÿ’…๐Ÿ‘‚๐Ÿ‘ƒ๐Ÿ‘ฃ๐Ÿ‘€๐Ÿ‘๐Ÿ‘…๐Ÿ‘„๐Ÿ’‹๐Ÿ’˜โค๐Ÿ’“๐Ÿ’”๐Ÿ’•๐Ÿ’–๐Ÿ’—๐Ÿ’™๐Ÿ’š๐Ÿ’›๐Ÿ’œ๐Ÿ–ค๐Ÿ’๐Ÿ’ž๐Ÿ’Ÿโฃ๐Ÿ’Œ๐Ÿ’ค๐Ÿ’ข๐Ÿ’ฃ๐Ÿ’ฅ๐Ÿ’ฆ๐Ÿ’จ๐Ÿ’ซ๐Ÿ’ฌ๐Ÿ—จ๐Ÿ—ฏ๐Ÿ’ญ๐Ÿ•ณ๐Ÿ‘“๐Ÿ•ถ๐Ÿ‘”๐Ÿ‘•๐Ÿ‘–๐Ÿ‘—๐Ÿ‘˜๐Ÿ‘™๐Ÿ‘š๐Ÿ‘›๐Ÿ‘œ๐Ÿ‘๐Ÿ›๐ŸŽ’๐Ÿ‘ž๐Ÿ‘Ÿ๐Ÿ‘ ๐Ÿ‘ก๐Ÿ‘ข๐Ÿ‘‘๐Ÿ‘’๐ŸŽฉ๐ŸŽ“โ›‘๐Ÿ“ฟ๐Ÿ’„๐Ÿ’๐Ÿ’Ž๐Ÿต๐Ÿ’๐Ÿฆ๐Ÿถ๐Ÿ•๐Ÿฉ๐Ÿบ๐ŸฆŠ๐Ÿฑ๐Ÿˆ๐Ÿฆ๐Ÿฏ๐Ÿ…๐Ÿ†๐Ÿด๐ŸŽ๐ŸฆŒ๐Ÿฆ„๐Ÿฎ๐Ÿ‚๐Ÿƒ๐Ÿ„๐Ÿท๐Ÿ–๐Ÿ—๐Ÿฝ๐Ÿ๐Ÿ‘๐Ÿ๐Ÿช๐Ÿซ๐Ÿ˜๐Ÿฆ๐Ÿญ๐Ÿ๐Ÿ€๐Ÿน๐Ÿฐ๐Ÿ‡๐Ÿฟ๐Ÿฆ‡๐Ÿป๐Ÿจ๐Ÿผ๐Ÿพ๐Ÿฆƒ๐Ÿ”๐Ÿ“๐Ÿฃ๐Ÿค๐Ÿฅ๐Ÿฆ๐Ÿง๐Ÿ•Š๐Ÿฆ…๐Ÿฆ†๐Ÿฆ‰๐Ÿธ๐ŸŠ๐Ÿข๐ŸฆŽ๐Ÿ๐Ÿฒ๐Ÿ‰๐Ÿณ๐Ÿ‹๐Ÿฌ๐ŸŸ๐Ÿ ๐Ÿก๐Ÿฆˆ๐Ÿ™๐Ÿš๐Ÿฆ€๐Ÿฆ๐Ÿฆ‘๐Ÿฆ‹๐ŸŒ๐Ÿ›๐Ÿœ๐Ÿ๐Ÿž๐Ÿ•ท๐Ÿ•ธ๐Ÿฆ‚๐Ÿ’๐ŸŒธ๐Ÿ’ฎ๐Ÿต๐ŸŒน๐Ÿฅ€๐ŸŒบ๐ŸŒป๐ŸŒผ๐ŸŒทโš˜๐ŸŒฑ๐ŸŒฒ๐ŸŒณ๐ŸŒด๐ŸŒต๐ŸŒพ๐ŸŒฟโ˜˜๐Ÿ€๐Ÿ๐Ÿ‚๐Ÿƒ๐Ÿ‡๐Ÿˆ๐Ÿ‰๐ŸŠ๐Ÿ‹๐ŸŒ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ๐Ÿ‘๐Ÿ’๐Ÿ“๐Ÿ…๐Ÿฅ๐Ÿฅ‘๐Ÿ†๐Ÿฅ”๐Ÿฅ•๐ŸŒฝ๐ŸŒถ๐Ÿฅ’๐Ÿ„๐Ÿฅœ๐ŸŒฐ๐Ÿž๐Ÿฅ๐Ÿฅ–๐Ÿฅž๐Ÿง€๐Ÿ–๐Ÿ—๐Ÿฅ“๐Ÿ”๐ŸŸ๐Ÿ•๐ŸŒญ๐ŸŒฎ๐ŸŒฏ๐Ÿฅ™๐Ÿฅš๐Ÿณ๐Ÿฅ˜๐Ÿฒ๐Ÿฅ—๐Ÿฟ๐Ÿฑ๐Ÿ˜๐Ÿ™๐Ÿš๐Ÿ›๐Ÿœ๐Ÿ๐Ÿ ๐Ÿข๐Ÿฃ๐Ÿค๐Ÿฅ๐Ÿก๐Ÿฆ๐Ÿง๐Ÿจ๐Ÿฉ๐Ÿช๐ŸŽ‚๐Ÿฐ๐Ÿซ๐Ÿฌ๐Ÿญ๐Ÿฎ๐Ÿฏ๐Ÿผ๐Ÿฅ›โ˜•๐Ÿต๐Ÿถ๐Ÿพ๐Ÿท๐Ÿธ๐Ÿน๐Ÿบ๐Ÿป๐Ÿฅ‚๐Ÿฝ๐Ÿด๐Ÿฅ„๐Ÿ”ช๐Ÿบ๐ŸŽƒ๐ŸŽ„๐ŸŽ†๐ŸŽ‡โœจ๐ŸŽˆ๐ŸŽ‰๐ŸŽŠ๐ŸŽ‹๐ŸŽ๐ŸŽŽ๐ŸŽ๐ŸŽ๐ŸŽ‘๐ŸŽ€๐ŸŽ๐ŸŽ—๐ŸŽŸ๐ŸŽซ๐ŸŽ–๐Ÿ†๐Ÿ…๐Ÿฅ‡๐Ÿฅˆ๐Ÿฅ‰โšฝ๏ธโšพ๏ธ๐Ÿ€๐Ÿ๐Ÿˆ๐Ÿ‰๐ŸŽพ๐ŸŽฑ๐ŸŽณ๐Ÿ๐Ÿ‘๐Ÿ’๐Ÿ“๐Ÿธ๐ŸฅŠ๐Ÿฅ‹๐Ÿฅ…๐ŸŽฏโ›ณ๐ŸŒ๏ธโ€โ™‚๏ธ๐ŸŒ๏ธโ€โ™€๏ธโ›ธ๐ŸŽฃ๐ŸŽฝ๐ŸŽฟโ›ท๐Ÿ‚๐Ÿ„โ€โ™‚๏ธ๐Ÿ„โ€โ™€๏ธ๐Ÿ‡๐ŸŠโ€โ™‚๏ธ๐ŸŠโ€โ™€๏ธโ›น๏ธโ€โ™‚๏ธโ›น๏ธโ€โ™€๏ธ๐Ÿ‹๏ธโ€โ™‚๏ธ๐Ÿ‹๏ธโ€โ™€๏ธ๐Ÿšดโ€โ™‚๏ธ๐Ÿšดโ€โ™€๏ธ๐Ÿšตโ€โ™‚๏ธ๐Ÿšตโ€โ™€๏ธ๐ŸŽ๐Ÿ๐Ÿคธโ€โ™‚๏ธ๐Ÿคธโ€โ™€๏ธ๐Ÿคผโ€โ™‚๏ธ๐Ÿคผโ€โ™€๏ธ๐Ÿคฝโ€โ™‚๏ธ๐Ÿคฝโ€โ™€๏ธ๐Ÿคพโ€โ™‚๏ธ๐Ÿคพโ€โ™€๏ธ๐Ÿคบ๐Ÿคนโ€โ™‚๏ธ๐Ÿคนโ€โ™€๏ธ๐ŸŽฎ๐Ÿ•น๐ŸŽฒโ™ ๏ธโ™ฅ๏ธโ™ฆ๏ธโ™ฃ๏ธ๐Ÿƒ๐Ÿ€„๐ŸŽด๐ŸŒ๐ŸŒŽ๐ŸŒ๐ŸŒ๐Ÿ—บ๐Ÿ”โ›ฐ๐ŸŒ‹๐Ÿ—ป๐Ÿ•๐Ÿ–๐Ÿœ๐Ÿ๐Ÿž๐ŸŸ๐Ÿ›๐Ÿ—๐Ÿ˜๐Ÿ™๐Ÿš๐Ÿ ๐Ÿก๐Ÿข๐Ÿฃ๐Ÿค๐Ÿฅ๐Ÿฆ๐Ÿจ๐Ÿฉ๐Ÿช๐Ÿซ๐Ÿฌ๐Ÿญ๐Ÿฏ๐Ÿฐ๐Ÿ’’๐Ÿ—ผ๐Ÿ—ฝโ›ช๐Ÿ•Œ๐Ÿ•โ›ฉ๐Ÿ•‹โ›ฒโ›บ๐ŸŒ๐ŸŒƒ๐ŸŒ„๐ŸŒ…๐ŸŒ†๐ŸŒ‡๐ŸŒ‰โ›ผโ™จ๏ธ๐ŸŒŒ๐ŸŽ ๐ŸŽก๐ŸŽข๐Ÿ’ˆ๐ŸŽช๐ŸŽญ๐Ÿ–ผ๐ŸŽจ๐ŸŽฐ๐Ÿš‚๐Ÿšƒ๐Ÿš„๐Ÿš…๐Ÿš†๐Ÿš‡๐Ÿšˆ๐Ÿš‰๐ŸšŠ๐Ÿš๐Ÿšž๐Ÿš‹๐ŸšŒ๐Ÿš๐ŸšŽ๐Ÿš๐Ÿš‘๐Ÿš’๐Ÿš“๐Ÿš”๐Ÿš•๐Ÿš–๐Ÿš—๐Ÿš˜๐Ÿš™๐Ÿšš๐Ÿš›โ›Ÿ๐Ÿšœ๐Ÿšฒ๐Ÿ›ด๐Ÿ›ต๐Ÿš๐Ÿ›ฃ๐Ÿ›คโ›ฝ๐Ÿšจ๐Ÿšฅ๐Ÿšฆ๐Ÿšง๐Ÿ›‘โš“โ›ต๐Ÿšฃโ€โ™‚๏ธ๐Ÿšฃโ€โ™€๏ธ๐Ÿ›ถ๐Ÿšค๐Ÿ›ณโ›ด๐Ÿ›ฅ๐Ÿšขโœˆ๐Ÿ›ฉ๐Ÿ›ซ๐Ÿ›ฌ๐Ÿ’บ๐Ÿš๐ŸšŸ๐Ÿš ๐Ÿšก๐Ÿš€๐Ÿ›ฐ๐Ÿ›Ž๐Ÿšช๐Ÿ›Œ๐Ÿ›๐Ÿ›‹๐Ÿšฝ๐Ÿšฟ๐Ÿ›€๐Ÿ›โŒ›โณโŒšโฐโฑโฒ๐Ÿ•ฐ๐Ÿ•›๐Ÿ•ง๐Ÿ•๐Ÿ•œ๐Ÿ•‘๐Ÿ•๐Ÿ•’๐Ÿ•ž๐Ÿ•“๐Ÿ•Ÿ๐Ÿ•”๐Ÿ• ๐Ÿ••๐Ÿ•ก๐Ÿ•–๐Ÿ•ข๐Ÿ•—๐Ÿ•ฃ๐Ÿ•˜๐Ÿ•ค๐Ÿ•™๐Ÿ•ฅ๐Ÿ•š๐Ÿ•ฆ๐ŸŒ‘๐ŸŒ’๐ŸŒ“๐ŸŒ”๐ŸŒ•๐ŸŒ–๐ŸŒ—๐ŸŒ˜๐ŸŒ™๐ŸŒš๐ŸŒ›๐ŸŒœ๐ŸŒกโ˜€๏ธ๐ŸŒ๐ŸŒžโญ๐ŸŒŸ๐ŸŒ โ˜๏ธโ›…โ›ˆ๐ŸŒค๐ŸŒฅ๐ŸŒฆ๐ŸŒง๐ŸŒจ๐ŸŒฉ๐ŸŒช๐ŸŒซ๐ŸŒฌ๐ŸŒ€๐ŸŒˆ๐ŸŒ‚โ˜‚๏ธโ˜”โ›ฑโšกโ„โ˜ƒ๏ธโ›„โ˜„๐Ÿ”ฅ๐Ÿ’ง๐ŸŒŠ๐Ÿ”‡๐Ÿ”ˆ๐Ÿ”‰๐Ÿ”Š๐Ÿ“ข๐Ÿ“ฃ๐Ÿ“ฏ๐Ÿ””๐Ÿ”•๐ŸŽผ๐ŸŽต๐ŸŽถ๐ŸŽ™๐ŸŽš๐ŸŽ›๐ŸŽค๐ŸŽง๐Ÿ“ป๐ŸŽท๐ŸŽธ๐ŸŽน๐ŸŽบ๐ŸŽป๐Ÿฅ๐Ÿ“ฑ๐Ÿ“ฒโ˜Ž๏ธ๐Ÿ“ž๐Ÿ“Ÿ๐Ÿ“ ๐Ÿ”‹๐Ÿ”Œ๐Ÿ’ป๐Ÿ–ฅ๐Ÿ–จโŒจ๐Ÿ–ฑ๐Ÿ–ฒ๐Ÿ’ฝ๐Ÿ’พ๐Ÿ’ฟ๐Ÿ“€๐ŸŽฅ๐ŸŽž๐Ÿ“ฝ๐ŸŽฌ๐Ÿ“บ๐Ÿ“ท๐Ÿ“ธ๐Ÿ“น๐Ÿ“ผ๐Ÿ”๐Ÿ”Ž๐Ÿ”ฌ๐Ÿ”ญ๐Ÿ“ก๐Ÿ•ฏ๐Ÿ’ก๐Ÿ”ฆ๐Ÿฎ๐Ÿ“”๐Ÿ“•๐Ÿ“–๐Ÿ“—๐Ÿ“˜๐Ÿ“™๐Ÿ“š๐Ÿ““๐Ÿ“’๐Ÿ“ƒ๐Ÿ“œ๐Ÿ“„๐Ÿ“ฐ๐Ÿ—ž๐Ÿ“‘๐Ÿ”–๐Ÿท๐Ÿ’ฐ๐Ÿ’ด๐Ÿ’ต๐Ÿ’ถ๐Ÿ’ท๐Ÿ’ธ๐Ÿ’ณ๐Ÿ’ฑ๐Ÿ’ฒโœ‰๐Ÿ“ง๐Ÿ“จ๐Ÿ“ฉ๐Ÿ“ค๐Ÿ“ฅ๐Ÿ“ฆ๐Ÿ“ซ๐Ÿ“ช๐Ÿ“ฌ๐Ÿ“ญ๐Ÿ“ฎ๐Ÿ—ณโœโœ’๐Ÿ–‹๐Ÿ–Š๐Ÿ–Œ๐Ÿ–๐Ÿ“๐Ÿ’ผ๐Ÿ“๐Ÿ“‚๐Ÿ—‚๐Ÿ“…๐Ÿ“†๐Ÿ—’๐Ÿ—“๐Ÿ“‡๐Ÿ“ˆ๐Ÿ“‰๐Ÿ“Š๐Ÿ“‹๐Ÿ“Œ๐Ÿ“๐Ÿ“Ž๐Ÿ–‡๐Ÿ“๐Ÿ“โœ‚๏ธ๐Ÿ—ƒ๐Ÿ—„๐Ÿ—‘๐Ÿ”’๐Ÿ”“๐Ÿ”๐Ÿ”๐Ÿ”‘๐Ÿ—๐Ÿ”จโ›โš’๐Ÿ› ๐Ÿ—กโš”๐Ÿ”ซ๐Ÿน๐Ÿ›ก๐Ÿ”ง๐Ÿ”ฉโš™๐Ÿ—œโš—โš–๐Ÿ”—โ›“๐Ÿ’‰๐Ÿ’Š๐Ÿšฌโšฐโšฑ๐Ÿ—ฟ๐Ÿ›ข๐Ÿ”ฎ๐Ÿ”ฎ๐Ÿง๐Ÿšฎ๐Ÿšฐโ™ฟ๐Ÿšน๐Ÿšบ๐Ÿšป๐Ÿšผ๐Ÿšพ๐Ÿ›‚๐Ÿ›ƒ๐Ÿ›„๐Ÿ›…โš ๏ธ๐Ÿšธโ›”๐Ÿšซ๐Ÿšณ๐Ÿšญ๐Ÿšฏ๐Ÿšฑ๐Ÿšท๐Ÿ“ต๐Ÿ”žโ˜ขโ˜ฃโฌ†๏ธโ†—๏ธโžก๏ธโ†˜๏ธโฌ‡๏ธโ†™๏ธโฌ…๏ธโ†–๏ธโ†•๏ธโ†”๏ธโ†ฉโ†ชโคด๏ธโคต๏ธ๐Ÿ”ƒ๐Ÿ”„๐Ÿ”™๐Ÿ”š๐Ÿ”›๐Ÿ”œ๐Ÿ”๐Ÿ›โš›๐Ÿ•‰โœกโ˜ธโ˜ฏ๏ธโ˜ฆโ˜ฎ๐Ÿ•Ž๐Ÿ”ฏโ™ˆโ™‰โ™Šโ™‹โ™Œโ™โ™Žโ™โ™โ™‘โ™’โ™“โ›Ž๐Ÿ”€๐Ÿ”๐Ÿ”‚โ–ถ๏ธโฉโญโฏโ—€๏ธโชโฎ๐Ÿ”ผโซ๐Ÿ”ฝโฌโธโนโบโ๐ŸŽฆ๐Ÿ”…๐Ÿ”†๐Ÿ“ถ๐Ÿ“ณ๐Ÿ“ดโ™ป๏ธ๐Ÿ“›โšœ๐Ÿ”ฐ๐Ÿ”ฑโญ•โœ…โ˜‘โœ”โœ–โŒโŽโž•โ™€๏ธโ™‚๏ธโš•โž–โž—โžฐโžฟใ€ฝโœณโœดโ‡โ‰๏ธโ“โ”โ•โ—ใ€ฐ๐Ÿ”Ÿ๐Ÿ’ฏ๐Ÿ” ๐Ÿ”ก๐Ÿ”ข๐Ÿ”ฃ๐Ÿ”ค๐Ÿ…ฐ๏ธ๐Ÿ†Ž๏ธ๐Ÿ…ฑ๏ธ๐Ÿ†‘๏ธ๐Ÿ†’๏ธ๐Ÿ†“๏ธโ„น๐Ÿ†”๏ธโ“‚๏ธ๐Ÿ†•๏ธ๐Ÿ†–๏ธ๐Ÿ…พ๏ธ๐Ÿ†—๏ธ๐Ÿ…ฟ๏ธ๐Ÿ†˜๏ธ๐Ÿ†™๏ธ๐Ÿ†š๏ธ๐Ÿˆ๐Ÿˆ‚๐Ÿˆท๐Ÿˆถ๐Ÿˆฏ๐Ÿ‰๐Ÿˆน๐Ÿˆš๐Ÿˆฒ๐Ÿ‰‘๐Ÿˆธ๐Ÿˆด๐ŸˆณใŠ—ใŠ™๐Ÿˆบ๐Ÿˆตโ–ซ๏ธโ—ปโ—ผโ—ฝโ—พโฌ›โฌœ๐Ÿ”ถ๏ธ๐Ÿ”ท๏ธ๐Ÿ”ธ๏ธ๐Ÿ”น๏ธ๐Ÿ”บ๏ธ๐Ÿ”ป๐Ÿ’ ๐Ÿ”˜๐Ÿ”ฒ๐Ÿ”ณโšชโšซ๐Ÿ”ด๐Ÿ”ต๐Ÿ๐Ÿšฉ๐Ÿด๐Ÿณ๐Ÿณ๏ธโ€๐ŸŒˆโš€โšโš‚โšƒโš„โš…โ›พโ™พ๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ฆ๐Ÿ‡ฉ๐Ÿ‡ฆ๐Ÿ‡ช๐Ÿ‡ฆ๐Ÿ‡ซ๐Ÿ‡ฆ๐Ÿ‡ฌ๐Ÿ‡ฆ๐Ÿ‡ฎ๐Ÿ‡ฆ๐Ÿ‡ฑ๐Ÿ‡ฆ๐Ÿ‡ฒ๐Ÿ‡ฆ๐Ÿ‡ด๐Ÿ‡ฆ๐Ÿ‡ถ๐Ÿ‡ฆ๐Ÿ‡ท๐Ÿ‡ฆ๐Ÿ‡ธ๐Ÿ‡ฆ๐Ÿ‡น๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡ฆ๐Ÿ‡ผ๐Ÿ‡ฆ๐Ÿ‡ฝ๐Ÿ‡ฆ๐Ÿ‡ฟ๐Ÿ‡ง๐Ÿ‡ฆ๐Ÿ‡ง๐Ÿ‡ง๐Ÿ‡ง๐Ÿ‡ฉ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ง๐Ÿ‡ซ๐Ÿ‡ง๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ญ๐Ÿ‡ง๐Ÿ‡ฎ๐Ÿ‡ง๐Ÿ‡ฏ๐Ÿ‡ง๐Ÿ‡ฑ๐Ÿ‡ง๐Ÿ‡ฒ๐Ÿ‡ง๐Ÿ‡ณ๐Ÿ‡ง๐Ÿ‡ด๐Ÿ‡ง๐Ÿ‡ถ๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ธ๐Ÿ‡ง๐Ÿ‡น๐Ÿ‡ง๐Ÿ‡ผ๐Ÿ‡ง๐Ÿ‡พ๐Ÿ‡ง๐Ÿ‡ฟ๐Ÿ‡จ๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡จ๐Ÿ‡จ๐Ÿ‡ฉ๐Ÿ‡จ๐Ÿ‡ซ๐Ÿ‡จ๐Ÿ‡ฌ๐Ÿ‡จ๐Ÿ‡ญ๐Ÿ‡จ๐Ÿ‡ฎ๐Ÿ‡จ๐Ÿ‡ฐ๐Ÿ‡จ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฒ๐Ÿ‡จ๐Ÿ‡ณ๐Ÿ‡จ๐Ÿ‡ด๐Ÿ‡จ๐Ÿ‡ท๐Ÿ‡จ๐Ÿ‡บ๐Ÿ‡จ๐Ÿ‡ป๐Ÿ‡จ๐Ÿ‡ผ๐Ÿ‡จ๐Ÿ‡ฝ๐Ÿ‡จ๐Ÿ‡พ๐Ÿ‡จ๐Ÿ‡ฟ๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡ฉ๐Ÿ‡ฏ๐Ÿ‡ฉ๐Ÿ‡ฐ๐Ÿ‡ฉ๐Ÿ‡ฒ๐Ÿ‡ฉ๐Ÿ‡ด๐Ÿ‡ฉ๐Ÿ‡ฟ๐Ÿ‡ช๐Ÿ‡จ๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡ฌ๐Ÿ‡ช๐Ÿ‡ญ๐Ÿ‡ช๐Ÿ‡ท๐Ÿ‡ช๐Ÿ‡ธ๐Ÿ‡ช๐Ÿ‡น๐Ÿ‡ช๐Ÿ‡บ๐Ÿ‡ซ๐Ÿ‡ฎ๐Ÿ‡ซ๐Ÿ‡ฏ๐Ÿ‡ซ๐Ÿ‡ฐ๐Ÿ‡ซ๐Ÿ‡ฒ๐Ÿ‡ซ๐Ÿ‡ด๐Ÿ‡ซ๐Ÿ‡ท๐Ÿ‡ฌ๐Ÿ‡ฆ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฌ๐Ÿ‡ฉ๐Ÿ‡ฌ๐Ÿ‡ช๐Ÿ‡ฌ๐Ÿ‡ซ๐Ÿ‡ฌ๐Ÿ‡ฌ๐Ÿ‡ฌ๐Ÿ‡ญ๐Ÿ‡ฌ๐Ÿ‡ฎ๐Ÿ‡ฌ๐Ÿ‡ฑ๐Ÿ‡ฌ๐Ÿ‡ฒ๐Ÿ‡ฌ๐Ÿ‡ณ๐Ÿ‡ฌ๐Ÿ‡ต๐Ÿ‡ฌ๐Ÿ‡ถ๐Ÿ‡ฌ๐Ÿ‡ท๐Ÿ‡ฌ๐Ÿ‡ธ๐Ÿ‡ฌ๐Ÿ‡น๐Ÿ‡ฌ๐Ÿ‡บ๐Ÿ‡ฌ๐Ÿ‡ผ๐Ÿ‡ฌ๐Ÿ‡พ๐Ÿ‡ญ๐Ÿ‡ฐ๐Ÿ‡ญ๐Ÿ‡ฒ๐Ÿ‡ญ๐Ÿ‡ณ๐Ÿ‡ญ๐Ÿ‡ท๐Ÿ‡ญ๐Ÿ‡น๐Ÿ‡ญ๐Ÿ‡บ๐Ÿ‡ฎ๐Ÿ‡จ๐Ÿ‡ฎ๐Ÿ‡ฉ๐Ÿ‡ฎ๐Ÿ‡ช๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฎ๐Ÿ‡ฒ๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ด๐Ÿ‡ฎ๐Ÿ‡ถ๐Ÿ‡ฎ๐Ÿ‡ท๐Ÿ‡ฎ๐Ÿ‡ธ๐Ÿ‡ฎ๐Ÿ‡น๐Ÿ‡ฏ๐Ÿ‡ช๐Ÿ‡ฏ๐Ÿ‡ฒ๐Ÿ‡ฏ๐Ÿ‡ด๐Ÿ‡ฏ๐Ÿ‡ต๐Ÿ‡ฐ๐Ÿ‡ช๐Ÿ‡ฐ๐Ÿ‡ฌ๐Ÿ‡ฐ๐Ÿ‡ญ๐Ÿ‡ฐ๐Ÿ‡ฎ๐Ÿ‡ฐ๐Ÿ‡ฒ๐Ÿ‡ฐ๐Ÿ‡ณ๐Ÿ‡ฐ๐Ÿ‡ต๐Ÿ‡ฐ๐Ÿ‡ท๐Ÿ‡ฐ๐Ÿ‡ผ๐Ÿ‡ฐ๐Ÿ‡พ๐Ÿ‡ฐ๐Ÿ‡ฟ๐Ÿ‡ฑ๐Ÿ‡ฆ๐Ÿ‡ฑ๐Ÿ‡ง๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฑ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฐ๐Ÿ‡ฑ๐Ÿ‡ท๐Ÿ‡ฑ๐Ÿ‡ธ๐Ÿ‡ฑ๐Ÿ‡น๐Ÿ‡ฑ๐Ÿ‡บ๐Ÿ‡ฑ๐Ÿ‡ป๐Ÿ‡ฑ๐Ÿ‡พ๐Ÿ‡ฒ๐Ÿ‡ฆ๐Ÿ‡ฒ๐Ÿ‡จ๐Ÿ‡ฒ๐Ÿ‡ฉ๐Ÿ‡ฒ๐Ÿ‡ช๐Ÿ‡ฒ๐Ÿ‡ฌ๐Ÿ‡ฒ๐Ÿ‡ญ๐Ÿ‡ฒ๐Ÿ‡ฐ๐Ÿ‡ฒ๐Ÿ‡ฑ๐Ÿ‡ฒ๐Ÿ‡ฒ๐Ÿ‡ฒ๐Ÿ‡ณ๐Ÿ‡ฒ๐Ÿ‡ด๐Ÿ‡ฒ๐Ÿ‡ต๐Ÿ‡ฒ๐Ÿ‡ถ๐Ÿ‡ฒ๐Ÿ‡ท๐Ÿ‡ฒ๐Ÿ‡ธ๐Ÿ‡ฒ๐Ÿ‡น๐Ÿ‡ฒ๐Ÿ‡บ๐Ÿ‡ฒ๐Ÿ‡ป๐Ÿ‡ฒ๐Ÿ‡ผ๐Ÿ‡ฒ๐Ÿ‡ฝ๐Ÿ‡ฒ๐Ÿ‡พ๐Ÿ‡ฒ๐Ÿ‡ฟ๐Ÿ‡ณ๐Ÿ‡ฆ๐Ÿ‡ณ๐Ÿ‡จ๐Ÿ‡ณ๐Ÿ‡ช๐Ÿ‡ณ๐Ÿ‡ซ๐Ÿ‡ณ๐Ÿ‡ฌ๐Ÿ‡ณ๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡ฑ๐Ÿ‡ณ๐Ÿ‡ด๐Ÿ‡ณ๐Ÿ‡ต๐Ÿ‡ณ๐Ÿ‡ท๐Ÿ‡ณ๐Ÿ‡บ๐Ÿ‡ณ๐Ÿ‡ฟ๐Ÿ‡ด๐Ÿ‡ฒ๐Ÿ‡ต๐Ÿ‡ฆ๐Ÿ‡ต๐Ÿ‡ช๐Ÿ‡ต๐Ÿ‡ซ๐Ÿ‡ต๐Ÿ‡ฌ๐Ÿ‡ต๐Ÿ‡ญ๐Ÿ‡ต๐Ÿ‡ฐ๐Ÿ‡ต๐Ÿ‡ฑ๐Ÿ‡ต๐Ÿ‡ฒ๐Ÿ‡ต๐Ÿ‡ณ๐Ÿ‡ต๐Ÿ‡ท๐Ÿ‡ต๐Ÿ‡ธ๐Ÿ‡ต๐Ÿ‡น๐Ÿ‡ต๐Ÿ‡ผ๐Ÿ‡ต๐Ÿ‡พ๐Ÿ‡ถ๐Ÿ‡ฆ๐Ÿ‡ท๐Ÿ‡ช๐Ÿ‡ท๐Ÿ‡ด๐Ÿ‡ท๐Ÿ‡ธ๐Ÿ‡ท๐Ÿ‡บ๐Ÿ‡ท๐Ÿ‡ผ๐Ÿ‡ธ๐Ÿ‡ฆ๐Ÿ‡ธ๐Ÿ‡ง๐Ÿ‡ธ๐Ÿ‡จ๐Ÿ‡ธ๐Ÿ‡ฉ๐Ÿ‡ธ๐Ÿ‡ช๐Ÿ‡ธ๐Ÿ‡ฌ๐Ÿ‡ธ๐Ÿ‡ญ๐Ÿ‡ธ๐Ÿ‡ฎ๐Ÿ‡ธ๐Ÿ‡ฐ๐Ÿ‡ธ๐Ÿ‡ฑ๐Ÿ‡ธ๐Ÿ‡ฒ๐Ÿ‡ธ๐Ÿ‡ณ๐Ÿ‡ธ๐Ÿ‡ด๐Ÿ‡ธ๐Ÿ‡ท๐Ÿ‡ธ๐Ÿ‡ธ๐Ÿ‡ธ๐Ÿ‡น๐Ÿ‡ธ๐Ÿ‡ป๐Ÿ‡ธ๐Ÿ‡ฝ๐Ÿ‡ธ๐Ÿ‡พ๐Ÿ‡ธ๐Ÿ‡ฟ๐Ÿ‡น๐Ÿ‡ฆ๐Ÿ‡น๐Ÿ‡จ๐Ÿ‡น๐Ÿ‡ฉ๐Ÿ‡น๐Ÿ‡ซ๐Ÿ‡น๐Ÿ‡ฌ๐Ÿ‡น๐Ÿ‡ญ๐Ÿ‡น๐Ÿ‡ฏ๐Ÿ‡น๐Ÿ‡ฐ๐Ÿ‡น๐Ÿ‡ฑ๐Ÿ‡น๐Ÿ‡ฒ๐Ÿ‡น๐Ÿ‡ณ๐Ÿ‡น๐Ÿ‡ด๐Ÿ‡น๐Ÿ‡ท๐Ÿ‡น๐Ÿ‡น๐Ÿ‡น๐Ÿ‡ป๐Ÿ‡น๐Ÿ‡ผ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‡บ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡ฌ๐Ÿ‡บ๐Ÿ‡ณ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ‡บ๐Ÿ‡พ๐Ÿ‡บ๐Ÿ‡ฟ๐Ÿ‡ป๐Ÿ‡ฆ๐Ÿ‡ป๐Ÿ‡จ๐Ÿ‡ป๐Ÿ‡ช๐Ÿ‡ป๐Ÿ‡ฌ๐Ÿ‡ป๐Ÿ‡ฎ๐Ÿ‡ป๐Ÿ‡ณ๐Ÿ‡ป๐Ÿ‡บ๐Ÿ‡ผ๐Ÿ‡ซ๐Ÿ‡ผ๐Ÿ‡ธ๐Ÿ‡ฝ๐Ÿ‡ฐ๐Ÿ‡พ๐Ÿ‡ช๐Ÿ‡พ๐Ÿ‡น๐Ÿ‡ฟ๐Ÿ‡ฆ๐Ÿ‡ฟ๐Ÿ‡ฒ๐Ÿ‡ฟ๐Ÿ‡ผ8<br/><br/><br/><br/>Sent from my Samsung Galaxy smartphone.</align>"; int font_size = 50; int counter = 0; void _button_clicked(void *data, Evas_Object *obj, void *event_info) { APP *app = data; font_size += 10; Evas_Textblock_Style *style = evas_textblock_style_new(); char buffer[100] = {0}; sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size); evas_textblock_style_set(style, buffer); evas_object_textblock_style_set(app->tb1, style); evas_textblock_style_free(style); style = NULL; } EAPI_MAIN int elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) { APP *app = calloc(1, sizeof(APP)); Evas_Object *win, *scroller1, *scroller2, *box; elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); win = elm_win_util_standard_add("", ""); elm_win_autodel_set(win, EINA_TRUE); box = elm_box_add(win); evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); scroller1 = elm_scroller_add(win); evas_object_size_hint_weight_set(scroller1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(scroller1, EVAS_HINT_FILL, EVAS_HINT_FILL); app->tb1 = evas_object_textblock_add(win); Evas_Textblock_Style *style = evas_textblock_style_new(); char buffer[100] = {0}; sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size); evas_textblock_style_set(style, buffer); evas_object_textblock_style_set(app->tb1, style); evas_textblock_style_free(style); style = NULL; evas_font_cache_set(evas_object_evas_get(app->tb1), 0); int w,h; evas_object_textblock_text_markup_set(app->tb1, ""); evas_object_size_hint_min_set(app->tb1, 400, 400); elm_object_content_set(scroller1, app->tb1); elm_box_pack_end(box, scroller1); elm_object_content_set(win, box); app->btnLoad = elm_button_add(win); elm_object_text_set(app->btnLoad, "Scale Font"); evas_object_smart_callback_add(app->btnLoad, "clicked", _button_clicked, app); evas_object_show(app->btnLoad); evas_object_move(app->btnLoad, 0, 20); evas_object_resize(app->btnLoad, 150, 20); evas_object_textblock_text_markup_set(app->tb1, text); evas_object_textblock_size_formatted_get(app->tb1, &w, &h); evas_object_size_hint_min_set(app->tb1, 400, w/400 + h + 150); evas_object_resize(win, 400, 400); evas_object_show(box); evas_object_show(scroller1); evas_object_show(scroller2); evas_object_show(win); elm_run(); return 0; } ELM_MAIN() ``` Reviewers: raster, woohyun, bowonryu, bu5hm4n, zmike, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8727 Differential Revision: https://phab.enlightenment.org/D11861
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_font_main.c102
1 files changed, 77 insertions, 25 deletions
diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c
index 548ce4d01c..3a5b280437 100644
--- a/src/lib/evas/common/evas_font_main.c
+++ b/src/lib/evas/common/evas_font_main.c
@@ -711,6 +711,46 @@ _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
711 fash->bucket[grp]->bucket[maj]->item[min] = glyph; 711 fash->bucket[grp]->bucket[maj]->item[min] = glyph;
712} 712}
713 713
714static void evas_font_glyph_load(RGBA_Font_Glyph *fg)
715{
716 if(fg->glyph) return;
717
718 RGBA_Font_Int *fi = fg->fi;
719 FT_UInt idx = fg->index;
720 FT_Error error;
721
722 const FT_Int32 hintflags[3] =
723 { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT };
724 static FT_Matrix transform = {0x10000, _EVAS_FONT_SLANT_TAN * 0x10000,
725 0x00000, 0x10000};
726
727 evas_common_font_int_reload(fi);
728 FTLOCK();
729 error = FT_Load_Glyph(fi->src->ft.face, idx,
730 (FT_HAS_COLOR(fi->src->ft.face) ?
731 (FT_LOAD_COLOR | hintflags[fi->hinting]) :
732 (FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP | hintflags[fi->hinting])));
733
734 FTUNLOCK();
735 if (error)
736 {
737 return;
738 }
739
740 /* Transform the outline of Glyph according to runtime_rend. */
741 if (fi->runtime_rend & FONT_REND_SLANT)
742 FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
743 /* Embolden the outline of Glyph according to rundtime_rend. */
744 if (fi->runtime_rend & FONT_REND_WEIGHT)
745 FT_GlyphSlot_Embolden(fi->src->ft.face->glyph);
746
747 FTLOCK();
748 error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
749 FTUNLOCK();
750
751 return;
752}
753
714EAPI RGBA_Font_Glyph * 754EAPI RGBA_Font_Glyph *
715evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx) 755evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
716{ 756{
@@ -749,48 +789,60 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
749 789
750 /* Transform the outline of Glyph according to runtime_rend. */ 790 /* Transform the outline of Glyph according to runtime_rend. */
751 if (fi->runtime_rend & FONT_REND_SLANT) 791 if (fi->runtime_rend & FONT_REND_SLANT)
752 FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform); 792 FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
753 /* Embolden the outline of Glyph according to rundtime_rend. */ 793 /* Embolden the outline of Glyph according to rundtime_rend. */
754 if (fi->runtime_rend & FONT_REND_WEIGHT) 794 if (fi->runtime_rend & FONT_REND_WEIGHT)
755 FT_GlyphSlot_Embolden(fi->src->ft.face->glyph); 795 FT_GlyphSlot_Embolden(fi->src->ft.face->glyph);
756 796
757 fg = calloc(1, sizeof(RGBA_Font_Glyph)); 797 fg = calloc(1, sizeof(RGBA_Font_Glyph));
758 if (!fg) return NULL; 798 if (!fg) return NULL;
759 799
760 FTLOCK(); 800 if (FT_HAS_COLOR(fi->src->ft.face))
761 error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
762 FTUNLOCK();
763 if (error)
764 { 801 {
765 free(fg); 802 fg->advance.x = fi->src->ft.face->glyph->advance.x * 1024;
766 if (!fi->fash) fi->fash = _fash_gl_new(); 803 fg->advance.y = fi->src->ft.face->glyph->advance.y * 1024;
767 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
768 return NULL;
769 }
770 804
771 { 805 FT_GlyphSlot slot = fi->src->ft.face->glyph;
772 FT_BBox outbox; 806 fg->width = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.width);
773 FT_Glyph_Get_CBox(fg->glyph, 807 fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.horiBearingX);
774 ((fi->hinting == 0) ? FT_GLYPH_BBOX_UNSCALED : 808 fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.horiBearingY);
775 FT_GLYPH_BBOX_GRIDFIT),
776 &outbox);
777 fg->width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin);
778 fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMin);
779 fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.yMax);
780 809
781 if (FT_HAS_FIXED_SIZES(fi->src->ft.face)) 810 if (FT_HAS_FIXED_SIZES(fi->src->ft.face))
782 { 811 {
783 if (FT_HAS_COLOR(fi->src->ft.face) && 812 if (fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
784 fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
785 { 813 {
786 fg->glyph->advance.x *= fi->scale_factor; 814 fg->advance.x *= fi->scale_factor;
787 fg->glyph->advance.y *= fi->scale_factor; 815 fg->advance.y *= fi->scale_factor;
788 fg->width *= fi->scale_factor; 816 fg->width *= fi->scale_factor;
789 fg->x_bear *= fi->scale_factor; 817 fg->x_bear *= fi->scale_factor;
790 fg->y_bear *= fi->scale_factor; 818 fg->y_bear *= fi->scale_factor;
791 } 819 }
792 } 820 }
793 } 821 }
822 else
823 {
824 FTLOCK();
825 error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
826 FTUNLOCK();
827 if (error)
828 {
829 free(fg);
830 if (!fi->fash) fi->fash = _fash_gl_new();
831 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
832 return NULL;
833 }
834 fg->advance.x = fg->glyph->advance.x;
835 fg->advance.y = fg->glyph->advance.y;
836
837 FT_BBox outbox;
838 FT_Glyph_Get_CBox(fg->glyph,
839 ((fi->hinting == 0) ? FT_GLYPH_BBOX_UNSCALED :
840 FT_GLYPH_BBOX_GRIDFIT),
841 &outbox);
842 fg->width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin);
843 fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMin);
844 fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.yMax);
845 }
794 846
795 fg->index = idx; 847 fg->index = idx;
796 fg->fi = fi; 848 fg->fi = fi;
@@ -813,7 +865,7 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
813 /* no cserve2 case */ 865 /* no cserve2 case */
814 if (fg->glyph_out) 866 if (fg->glyph_out)
815 return EINA_TRUE; 867 return EINA_TRUE;
816 868 evas_font_glyph_load(fg);
817 FTLOCK(); 869 FTLOCK();
818 error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1); 870 error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
819 if (error) 871 if (error)