Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeTypeレンダラでdrawTextのshadowlevelが機能していない #177

Open
miahmie opened this issue Aug 20, 2015 · 2 comments
Open

Comments

@miahmie
Copy link
Contributor

miahmie commented Aug 20, 2015

FreeTypeで文字を描画した時に,影・フチ用のぼかし指定が機能しておりません。
GDIFontRasterizer::GetBitmap()で「if(font.Blured) data->Blur();」相当の処理がFreeTypeFontRasterizer::GetBitmap()にないことが原因かと思われます。

動作確認サンプルスクリプト:

var win = new Window();
win.add(new Layer(win, null));
var lay = new Layer(win, win.primaryLayer);

lay.setImageSize(200, 40);
Font.rasterizer = frGDI;
test(lay, "GDI", 2);
Font.rasterizer = frFreeType;
test(lay, "FreeType", 22);
lay.saveLayerImage("shadowlevels.png", "png");

function test(lay, tag, oy) {
    with (lay) {
        .font.height = 16;
        .font.face = "MS ゴシック";
        .drawText(2, oy, @"影ぼかしテスト(${tag})", 
            0xFFFF00, 255, true, /*shadowlevel*/1024, 0x000000, 2, 2, 2);
    }
}

結果イメージ:
shadowlevels

@jin1016
Copy link
Member

jin1016 commented Jan 10, 2016

https://github.com/krkrz/krkrz/tree/fix177
で修正。

@jin1016
Copy link
Member

jin1016 commented Mar 11, 2016

本体へマージ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants