Jump to content

With Copyfitting Rule


MikeVM

Recommended Posts

Trying to use Copyfit ule for different frames:

- for frame BCKHD I need to set tracking between 105 and 125% (assuming that 100% is regular tracking). Default tracking for this frame is 125%;

- for frame WWW - copyfit web address (font size between 7 and 9 pt;

- for any other frames with applied copyfitting rule - copyfit text.

 

[color=black]if (FusionPro.Composition.CurrentFlow.name == "BCKHD")[/color]
[color=black]{[/color]
[color=black] if (!Copyfit(new MagnifyAttributes("tracking", 105, 125, 0, 0)))[/color]
[color=black]     ReportWarning("Could not copyfit text in flow " + [/color]
[color=black]                   FusionPro.Composition.CurrentFlow.name);[/color]
[color=black]}                     [/color]

[color=black]if (FusionPro.Composition.CurrentFlow.name == "WWW")[/color]
[color=black]{[/color]
[color=black] if (!Copyfit(new MagnifyAttributes("text", 25, 400, 7, 9)))[/color]
[color=black]     ReportWarning("Could not copyfit text in flow " + [/color]
[color=black]                   FusionPro.Composition.CurrentFlow.name);[/color]
[color=black]}[/color]
[color=black]else[/color]
[color=black]{[/color]
[color=black] if (!Copyfit(new MagnifyAttributes("text", 25, 400, 10.75, 13)))[/color]
[color=black]     ReportWarning("Could not copyfit text in flow " + [/color]
[color=black]                   FusionPro.Composition.CurrentFlow.name);[/color]
[color=black]}[/color]

 

This is what I get - instead of adjusting tracking in the frame BCKHD the rule adjust text size - which I do not want to happen!

 

Any help?

Link to comment
Share on other sites

[color=black]if (FusionPro.Composition.CurrentFlow.name == "BCKHD")[/color]
[color=black]{[/color]
[color=black]if (!Copyfit(new MagnifyAttributes("tracking", 105, 125, 0, 0)))[/color]
[color=black]  ReportWarning("Could not copyfit text in flow " + [/color]
[color=black]                FusionPro.Composition.CurrentFlow.name);[/color]
[color=black]}                     [/color]

[color=black]if (FusionPro.Composition.CurrentFlow.name == "WWW")[/color]
[color=black]{[/color]
[color=black]if (!Copyfit(new MagnifyAttributes("text", 25, 400, 7, 9)))[/color]
[color=black]  ReportWarning("Could not copyfit text in flow " + [/color]
[color=black]                FusionPro.Composition.CurrentFlow.name);[/color]
[color=black]}[/color]
[color=black]else[/color]
[color=black]{[/color]
[color=black]if (!Copyfit(new MagnifyAttributes("text", 25, 400, 10.75, 13)))[/color]
[color=black]  ReportWarning("Could not copyfit text in flow " + [/color]
[color=black]                FusionPro.Composition.CurrentFlow.name);[/color]
[color=black]}[/color]

 

This is what I get - instead of adjusting tracking in the frame BCKHD the rule adjust text size - which I do not want to happen!

 

Your "else" clause is still executing for anything not a "WWW" frame, including the "BCKHD".

 

Try this (I did this in Notepad, so there may be syntax errors, didn't have time to check it.).

 

switch (FusionPro.Composition.CurrentFlow.name){
case "BCKHD":
if (!Copyfit(new MagnifyAttributes("tracking", 105, 125, 0, 0))){
    ReportWarning("Could not copyfit text in flow " + 
                  FusionPro.Composition.CurrentFlow.name);}
   break;

case "WWW": 
if (!Copyfit(new MagnifyAttributes("text", 25, 400, 7, 9))){
    ReportWarning("Could not copyfit text in flow " + 
                  FusionPro.Composition.CurrentFlow.name);}
   break;

default:
if (!Copyfit(new MagnifyAttributes("text", 25, 400, 10.75, 13))){
    ReportWarning("Could not copyfit text in flow " + 
                  FusionPro.Composition.CurrentFlow.name);}
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...