From ebdf617d98014a0456de94afcf30d5ee2747fbe2 Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 2 Dec 2012 19:16:59 +0000 Subject: [PATCH] Draw: optional glyph index in GlyphInfo git-svn-id: svn://ultimatepp.org/upp/trunk@5619 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Draw/FontFc.cpp | 1 + uppsrc/Draw/FontInt.h | 1 + 2 files changed, 2 insertions(+) diff --git a/uppsrc/Draw/FontFc.cpp b/uppsrc/Draw/FontFc.cpp index 94070de3e..08bec1c74 100644 --- a/uppsrc/Draw/FontFc.cpp +++ b/uppsrc/Draw/FontFc.cpp @@ -194,6 +194,7 @@ GlyphInfo GetGlyphInfoSys(Font font, int chr) gi.width = TRUNC(ROUND(face->glyph->advance.x)); gi.lspc = TRUNC(left); gi.rspc = gi.width - width - gi.lspc; + gi.glyphi = glyph_index; } } } diff --git a/uppsrc/Draw/FontInt.h b/uppsrc/Draw/FontInt.h index 01c77fe5b..dd6c23154 100644 --- a/uppsrc/Draw/FontInt.h +++ b/uppsrc/Draw/FontInt.h @@ -36,6 +36,7 @@ struct GlyphInfo { int16 width; int16 lspc; int16 rspc; + word glyphi; // optional, not available in Win32 bool IsNormal() const { return (word)width != 0x8000; } bool IsComposed() const { return !IsNormal() && (lspc == -1 || lspc == -11); }