mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
Draw: Numerous fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@1473 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
cf0af7d760
commit
90bf24af9c
5 changed files with 51 additions and 60 deletions
|
|
@ -105,7 +105,7 @@ int Paragraph::GetWidth(int zoom) const {
|
|||
const char *s = pptr->text;
|
||||
int n = pptr->text.GetLength();
|
||||
while(n--) {
|
||||
cx += pf[*s == 31 ? 32 : (byte) *s];
|
||||
cx += pf[*s == 31 ? 32 : ToUnicode((byte) *s, CHARSET_DEFAULT)];
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
|
@ -165,11 +165,10 @@ bool Paragraph::Format(ParaTypo& pfmt, int cx, int zoom) const {
|
|||
font.Height(DocZoom(zoom, pptr->font.GetHeight()));
|
||||
FontInfo pf = pp->Set(font, pptr->color);
|
||||
const char *s = pptr->text;
|
||||
// LOG("Format " << s << " a: " << pf.GetAscent() << " d: " << pf.GetDescent());
|
||||
int n = pptr->text.GetLength();
|
||||
while(n--) {
|
||||
*cp++ = *s;
|
||||
*wp++ = pf[*s == 31 ? 32 : (byte) *s];
|
||||
*wp++ = pf[*s == 31 ? 32 : ToUnicode((byte) *s, CHARSET_DEFAULT)];
|
||||
*ip++ = pp;
|
||||
s++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue