alphabetic textBaseline support. (#1173)

This commit is contained in:
James Chen
2018-03-29 16:24:36 +08:00
committed by GitHub
parent 73eb73c690
commit 3c1da2db6c
3 changed files with 3 additions and 3 deletions
@@ -359,7 +359,7 @@ void CanvasRenderingContext2D::set_textBaseline(const std::string& textBaseline)
{
_impl->setTextBaseline(CanvasTextBaseline::MIDDLE);
}
else if (textBaseline == "bottom")
else if (textBaseline == "bottom" || textBaseline == "alphabetic") //TODO:cjh, how to deal with alphabetic, currently we handle it as bottom mode.
{
_impl->setTextBaseline(CanvasTextBaseline::BOTTOM);
}
@@ -518,7 +518,7 @@ void CanvasRenderingContext2D::set_textBaseline(const std::string& textBaseline)
{
_impl.textBaseLine = CanvasTextBaseline::MIDDLE;
}
else if (textBaseline == "bottom")
else if (textBaseline == "bottom" || textBaseline == "alphabetic") //TODO:cjh, how to deal with alphabetic, currently we handle it as bottom mode.
{
_impl.textBaseLine = CanvasTextBaseline::BOTTOM;
}
@@ -522,7 +522,7 @@ void CanvasRenderingContext2D::set_textBaseline(const std::string& textBaseline)
{
_impl.textBaseLine = CanvasTextBaseline::MIDDLE;
}
else if (textBaseline == "bottom")
else if (textBaseline == "bottom" || textBaseline == "alphabetic") //TODO:cjh, how to deal with alphabetic, currently we handle it as bottom mode.
{
_impl.textBaseLine = CanvasTextBaseline::BOTTOM;
}