Commit 57a2a0a9 authored by Alexey.Musinov's avatar Alexey.Musinov

Merge branch 'release/v5.0.0' of https://github.com/ONLYOFFICE/sdkjs into release/v5.0.0

* 'release/v5.0.0' of https://github.com/ONLYOFFICE/sdkjs:
  Fixed bug with drawing a non-breaking space
parents c194a566 ddc3dbf3
...@@ -252,28 +252,26 @@ ParaText.prototype = ...@@ -252,28 +252,26 @@ ParaText.prototype =
}, },
Draw : function(X, Y, Context) Draw : function(X, Y, Context)
{ {
var CharCode = this.Value; var CharCode = this.Value;
var FontKoef = 1; var FontKoef = 1;
if ( this.Flags & PARATEXT_FLAGS_FONTKOEF_SCRIPT && this.Flags & PARATEXT_FLAGS_FONTKOEF_SMALLCAPS ) if (this.Flags & PARATEXT_FLAGS_FONTKOEF_SCRIPT && this.Flags & PARATEXT_FLAGS_FONTKOEF_SMALLCAPS)
FontKoef = smallcaps_and_script_koef; FontKoef = smallcaps_and_script_koef;
else if ( this.Flags & PARATEXT_FLAGS_FONTKOEF_SCRIPT ) else if (this.Flags & PARATEXT_FLAGS_FONTKOEF_SCRIPT)
FontKoef = vertalign_Koef_Size; FontKoef = vertalign_Koef_Size;
else if ( this.Flags & PARATEXT_FLAGS_FONTKOEF_SMALLCAPS ) else if (this.Flags & PARATEXT_FLAGS_FONTKOEF_SMALLCAPS)
FontKoef = smallcaps_Koef; FontKoef = smallcaps_Koef;
Context.SetFontSlot(((this.Flags >> 8) & 0xFF), FontKoef); Context.SetFontSlot(((this.Flags >> 8) & 0xFF), FontKoef);
var ResultCharCode = (this.Flags & PARATEXT_FLAGS_CAPITALS ? (String.fromCharCode(CharCode).toUpperCase()).charCodeAt(0) : CharCode);
if ( true === this.Is_NBSP() && editor && editor.ShowParaMarks ) var ResultCharCode = (this.Flags & PARATEXT_FLAGS_CAPITALS ? (String.fromCharCode(CharCode).toUpperCase()).charCodeAt(0) : CharCode);
{
Context.FillText(X, Y, String.fromCharCode(0x00B0)); if (true !== this.Is_NBSP())
} Context.FillTextCode(X, Y, ResultCharCode);
else else if (editor && editor.ShowParaMarks)
Context.FillTextCode(X, Y, ResultCharCode); Context.FillText(X, Y, String.fromCharCode(0x00B0));
}, },
Measure : function(Context, TextPr) Measure : function(Context, TextPr)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment