-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inconsistent value with really low contrast in fontLookupAPCA()
#113
Comments
Contrasts under I'm not sure what you mean when you say "expected value is 999" ? I think what is going on is there is no In order to use values under |
My aim was to plot the values -108 to 106 using the result of fontLookupAPCA(). Except that in the -5 to 5 range, the curve doesn't make any sense when it could easily be flat:
|
I see, though for apca-w3, there are no valid values under Lc ±7. But if you are just taking the iterated output of the Fix AThe interim fix is either to set the first element of the const fontMatrixAscend = [
['Lc',100,200,300,400,500,600,700,800,900],
[.... To const fontMatrixAscend = [
['Lc',999,999,999,999,999,999,999,999,999],
[.... Fix BOr add a const fontMatrixAscend = [
['Lc',100,200,300,400,500,600,700,800,900],
[0,999,999,999,999,999,999,999,999,999],
[5,999,999,999,999,999,999,999,999,999], // Insert this line
[10,999,999,999,999,999,999,999,999...
;
const fontDeltaAscend = [
['∆Lc',100,200,300,400,500,600,700,800,900],
[0,0,0,0,0,0,0,0,0,0],
[5,0,0,0,0,0,0,0,0,0], // Insert this line
[10,0,0,0,0,0,0,0,0,0],
;
const contrastArrayAscend = ['lc',0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125];
// ^ insert the 5 Thank you for reporting, it will be corrected in the next update. Please let me know if I can be of further assistance. |
Also just FYI, the lookups will be replaced with a pure algorithmic approach in the not too distant future. The LUTs are for developmental purposes. |
Describe the bug
In
fontLookupAPCA()
from apca-w3, a contrast less than 5 returns 500, 600, 700, 800 and 900 instead of 999To Reproduce
Expected behavior
All values should be 999.
Additional context
The bug is here: https://github.com/Myndex/apca-w3/blob/master/src/apca-w3.js#L571 which selects index 0 corresponding to a header.
The formula should probably look like
Or else everything is out of sync and it should be
This does not happen using APCAcontrast since the minimum value returned is greater than 7.3 and less than -7.3.
The text was updated successfully, but these errors were encountered: