Skip to content

Commit 6996f34

Browse files
astiobarch1t3cht
authored andcommitted
Resample Outline, Shadow, \bord, \shad like before for consistency
For consistency with other Aegisub builds (and with old libass), stick to resampling based on just the height for now. Ideally, anamorphic resampling should convert \bord to \xbord\ybord and \shad to \xshad\yshad.
1 parent 0a1002c commit 6996f34

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/ass_override.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,12 @@ static void load_protos() {
181181
// Longer tag names must appear before shorter tag names
182182

183183
proto[0].Set("\\alpha", VariableDataType::TEXT, AssParameterClass::ALPHA); // \alpha&H<aa>&
184-
proto[++i].Set("\\bord", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_XY); // \bord<depth>
184+
185+
// FIXME: convert \bord and \shad to \xbord\ybord and \xshad\yshad during anamorphic resampling
186+
proto[++i].Set("\\bord", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_Y); // \bord<depth>
185187
proto[++i].Set("\\xbord", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_X); // \xbord<depth>
186188
proto[++i].Set("\\ybord", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_Y); // \ybord<depth>
187-
proto[++i].Set("\\shad", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_XY); // \shad<depth>
189+
proto[++i].Set("\\shad", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_Y); // \shad<depth>
188190
proto[++i].Set("\\xshad", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_X); // \xshad<depth>
189191
proto[++i].Set("\\yshad", VariableDataType::FLOAT, AssParameterClass::ABSOLUTE_SIZE_Y); // \yshad<depth>
190192

src/resolution_resampler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ namespace {
185185

186186
void resample_style(resample_state *state, AssStyle &style) {
187187
style.fontsize = int(style.fontsize * state->ry + 0.5);
188-
style.outline_w *= state->rm;
189-
style.shadow_w *= state->rm;
188+
style.outline_w *= state->ry;
189+
style.shadow_w *= state->ry;
190190
style.spacing *= state->ry; // gets multiplied by scalex (and hence by ar) during rendering
191191
style.scalex *= state->ar;
192192
for (int i = 0; i < 3; i++)

0 commit comments

Comments
 (0)