Dmitry Timoshkov wrote:
As an additional optimization, probably it would be better to call
WineEngGetTextMetrics instead of GetTextMetricsW to avoid introducing
hdc as another parameter of WineEngGetGlyphIndices.
Sounds good and simpler, will give it a try.
Jeff
"Jeff L" <[EMAIL PROTECTED]> wrote:
if(dc->gdiFont)
- ret = WineEngGetGlyphIndices(dc->gdiFont, lpstr, count, pgi, flags);
+ ret = WineEngGetGlyphIndices(hdc, dc->gdiFont, lpstr, count, pgi, flags);
...
+GetTextMetricsW(hdc, &textm);
As an additional optimization, pro
Alexandre Julliard wrote:
Jeff L <[EMAIL PROTECTED]> writes:
+/* Note that the call to GetTextMetricsW is made in the loop *
+ * because it is less likely to have non existant glyphs *
+ * and hence we should have few calls to Ge
Jeff L <[EMAIL PROTECTED]> writes:
> for(i = 0; i < count; i++)
> +{
> pgi[i] = get_glyph_index(font, lpstr[i]);
> -
> +if (pgi[i] == 0)
> +{
> +if (flags & GGI_MARK_NONEXISTING_GLYPHS)
> +pgi[i] = 0x001f; /* Indicate
Andreas Mohr wrote:
This should have gone into a comment right there because it's
a very normal reaction to immediately question code like that,
so the code should properly defend itself by default ;)
IOW just the usual "do coding as obvious as possible, then properly comment
everything else th
Hi,
On Mon, Aug 14, 2006 at 06:49:00PM +1000, Jeff Latimer wrote:
> Dmitry Timoshkov wrote:
> >I'd suggest to move GetTextMetricsW outside of the loop to not kill
> >the performance.
>
> I put it inside the loop as I assumed that a non existent glyph would
> be relatively rare and the call wo
Dmitry Timoshkov wrote:
"Jeff L" <[EMAIL PROTECTED]> wrote:
+DWORD WineEngGetGlyphIndices(HDC hdc, GdiFont font, LPCWSTR lpstr,
INT count,
LPWORD pgi, DWORD flags)
{
INT i;
-
+TEXTMETRICW textm;
for(i = 0; i < count; i++)
+{
pgi[i] = get_glyph_index(font, lpstr[i]);
-
"Jeff L" <[EMAIL PROTECTED]> wrote:
-DWORD WineEngGetGlyphIndices(GdiFont font, LPCWSTR lpstr, INT count,
+ * */
Strange indentation at the end of a comment.
+DWORD WineEngGetGlyphIndices(HDC hdc, GdiFont font, LPCWSTR lpstr, INT count,
LPWORD pgi, DWORD flags)
{
INT i;
-
+TEXTMETRI