Why do boolean custom parameters have two checkboxes?

I am wondering what the concept is behind having two checkboxes for boolean custom parameters such as this:

Screenshot 2021-06-05 at 14.57.35

Isn’t that a bit confusing for the user? What is the difference between un-checking the left vs the right checkbox?

When handling this programmatically, is there anything specific I need to consider?

NSNumber * linkMetricsWithFirstMaster = [fontMaster customValueForKey:@"Link Metrics With First Master"];
if ( linkMetricsWithFirstMaster != nil && linkMetricsWithFirstMaster.integerValue == 1 ) {
	// do something
}
else {
	// do something else
}

Is this safe?

The checkbox on the left enables or disabled the parameter while the one on the right enables or disables the value of the parameter. So:

  • left checkbox off: value = default
  • left checkbox on:
    • right checkbox off: value = false
    • right checkbox on: value = true

This is somewhat confusing, but it falls out of the general layout that all rows have, since all rows can be disabled/enabled with the checkbox on the left.

Yes, if the left checkbox is disabled, the parameter is not reported by the Glyphs API for the font/master/instance and thus nil is returned (your first check in the if test).

Thanks!

Oh, it seems the check against nil is not necessary, strictly speaking, as linkMetricsWithFirstMaster.integerValue would return 0. I guess I’ll keep this code anyway as it is more readable.

We have an issue on our list about differentiating between the two UI-wise.

1 Like