[Scummvm-git-logs] scummvm master -> 6552dae1a514f89b74dffc672327db5f974110f7

sev- noreply at scummvm.org
Wed Jun 21 17:18:45 UTC 2023


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b7e09d8259 GRAPHICS: MACGUI: Fix alignment issues for multiline text
dbfb410054 DIRECTOR: Support fonts loading from resource-fork
dd784e7367 DIRECTOR: Fix formatting
283b5c4b20 GRAPHICS: MACGUI: Fix kMacRoman fonts issues with special characters
6552dae1a5 GRAPHICS: Fixed irregular fonts height in macfonts


Commit: b7e09d82597e3ceff52dcb4c2133d4b2a2d7a25c
    https://github.com/scummvm/scummvm/commit/b7e09d82597e3ceff52dcb4c2133d4b2a2d7a25c
Author: Harishankar Kumar (hari01584 at gmail.com)
Date: 2023-06-21T20:18:39+03:00

Commit Message:
GRAPHICS: MACGUI: Fix alignment issues for multiline text

This patch fixes the alignment issue for multiline text in text castMember
it increases the line height of each line by one, this added change over
multiple lines result in fixed alignment. This patch also removes the height
reduction due to empty line (which cumulatively caused the alignment issue).

`DATA/SUPPORT/INTRODUCTION at 111` of 'warlock-100' has this alignment issue
where the text "The Blaster" was above the button it was supposed to be.

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index e9b705dc7a7..318db810e3b 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -1039,8 +1039,6 @@ int MacText::getLineWidth(int line, bool enforce, int col) {
 		height = MAX(height, _textLines[line].chunks[i].getFont()->getFontHeight());
 	}
 
-	if (!hastext && _textLines.size() > 1)
-		height = height > 3 ? height - 3 : 0;
 
 	_textLines[line].width = width;
 	_textLines[line].height = height;


Commit: dbfb410054618122e10b3ccc2fb5a4b4af40fb50
    https://github.com/scummvm/scummvm/commit/dbfb410054618122e10b3ccc2fb5a4b4af40fb50
Author: Harishankar Kumar (hari01584 at gmail.com)
Date: 2023-06-21T20:18:39+03:00

Commit Message:
DIRECTOR: Support fonts loading from resource-fork

This drops the _castArchive->hasResource() check that was placed
before loading 'FOND' resource type.

Fixes texts fonts for 'theapartment-4' where 'shared.dir' has
'DecoText' font in the resource-fork.

Changed paths:
    engines/director/cast.cpp


diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 54706b44c2f..ce75af2d1d6 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -489,11 +489,7 @@ void Cast::loadCast() {
 	Common::SeekableReadStreamEndian *r = nullptr;
 
 	// Font Directory
-	if (_castArchive->hasResource(MKTAG('F', 'O', 'N', 'D'), -1)) {
-		debug("Cast::loadCast(): Movie has fonts. Loading....");
-
-		_vm->_wm->_fontMan->loadFonts(_castArchive->getPathName());
-	}
+	_vm->_wm->_fontMan->loadFonts(_castArchive->getPathName());
 
 	// CastMember Information Array
 	if (_castArchive->hasResource(MKTAG('V', 'W', 'C', 'R'), -1)) {


Commit: dd784e736770f8ba03fa69ac0ee680b1ebc17d59
    https://github.com/scummvm/scummvm/commit/dd784e736770f8ba03fa69ac0ee680b1ebc17d59
Author: Harishankar Kumar (hari01584 at gmail.com)
Date: 2023-06-21T20:18:39+03:00

Commit Message:
DIRECTOR: Fix formatting

Changed paths:
    engines/director/castmember/text.cpp


diff --git a/engines/director/castmember/text.cpp b/engines/director/castmember/text.cpp
index a5c451ded60..e9709c46908 100644
--- a/engines/director/castmember/text.cpp
+++ b/engines/director/castmember/text.cpp
@@ -254,7 +254,7 @@ Graphics::MacWidget *TextCastMember::createWidget(Common::Rect &bbox, Channel *c
 		if (_textType == kTextTypeAdjustToFit) {
 			dims.right = MIN<int>(dims.right, dims.left + _initialRect.width());
 			dims.bottom = MIN<int>(dims.bottom, dims.top + _initialRect.height());
-		} else if (_textType == kTextTypeFixed){
+		} else if (_textType == kTextTypeFixed) {
 			// use initialRect to create widget for fixed style text, this maybe related to version.
 			dims.right = MAX<int>(dims.right, dims.left + _initialRect.width());
 			dims.bottom = MAX<int>(dims.bottom, dims.top + _initialRect.height());


Commit: 283b5c4b20e86a95954d3e8f8527f2e240a69759
    https://github.com/scummvm/scummvm/commit/283b5c4b20e86a95954d3e8f8527f2e240a69759
Author: Harishankar Kumar (hari01584 at gmail.com)
Date: 2023-06-21T20:18:39+03:00

Commit Message:
GRAPHICS: MACGUI: Fix kMacRoman fonts issues with special characters

This commit removes Mac Roman from plainByteMode(), this partially
reverts commit `9d4ac18be542eed5fdbb52519fd95ea7ac47a9e4` from
PR #3823, this change breaks Hebrew rendering in Pink.

Fixes rendering of texts in `theapartment` using MacRoman fonts.

Changed paths:
    graphics/macgui/mactext.cpp


diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 318db810e3b..f5d1b377287 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -76,9 +76,9 @@ Common::CodePage MacFontRun::getEncoding() {
 
 bool MacFontRun::plainByteMode() {
 	Common::CodePage encoding = getEncoding();
-	// This return statement accounts for utf8, invalid, and Mac Roman.
+	// This return statement accounts for utf8, invalid.
 	// For future Unicode font compatibility, it should account for all codepages instead.
-	return encoding != Common::kUtf8 && encoding != Common::kCodePageInvalid && encoding != Common::kMacRoman;
+	return encoding != Common::kUtf8 && encoding != Common::kCodePageInvalid;
 }
 
 Common::String MacFontRun::getEncodedText() {


Commit: 6552dae1a514f89b74dffc672327db5f974110f7
    https://github.com/scummvm/scummvm/commit/6552dae1a514f89b74dffc672327db5f974110f7
Author: Harishankar Kumar (hari01584 at gmail.com)
Date: 2023-06-21T20:18:39+03:00

Commit Message:
GRAPHICS: Fixed irregular fonts height in macfonts

leading of a font is added to the height of the font when returning font
height, additionally the definition of leading says:
`Alternatively called line spacing, leading is the space between lines`

This fixes alignment of texts in `warlock-100` while also fixing the
line heights in `theapartment`.

Changed paths:
    graphics/fonts/macfont.h


diff --git a/graphics/fonts/macfont.h b/graphics/fonts/macfont.h
index 38aa749b6e4..91a2dcabbc4 100644
--- a/graphics/fonts/macfont.h
+++ b/graphics/fonts/macfont.h
@@ -168,7 +168,7 @@ public:
 	MacFONTFont(const MacFONTdata &data);
 	virtual ~MacFONTFont();
 
-	virtual int getFontHeight() const { return _data._fRectHeight; }
+	virtual int getFontHeight() const { return _data._fRectHeight + getFontLeading(); }
 	virtual int getFontAscent() const { return _data._ascent; }
 	virtual int getFontDescent() const { return _data._descent; }
 	virtual int getFontLeading() const { return _data._leading; }




More information about the Scummvm-git-logs mailing list