-
Notifications
You must be signed in to change notification settings - Fork 717
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
Add contour draw option to H.Metrics. #5496
base: master
Are you sure you want to change the base?
Add contour draw option to H.Metrics. #5496
Conversation
7d7731d
to
fdcbda7
Compare
fix cp to Cmake copy
fdcbda7
to
3a1679d
Compare
…y() in order to stay DRY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
@skef, please take a look. |
int height = 0; | ||
for (spl = set; spl != NULL; spl = spl->next) | ||
{ | ||
Color fc = spl->is_clip_path ? clippathcol : fg; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried this, but from the code it seems like you turn on the metrics option and you get the outline in the foreground color? Is that always going to make sense? What if you have a mix of closed and open contours (maybe you're in the middle of developing a stroked font) and want to see the contrast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess from the attached image it's already a different color ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image is corresponds to this code.
fg is passed as function argument.
In fontview.c it's called with green color:
CVDrawSplinePointList(NULL, pixmap, sc->layers[1].splines, fvmetadvancetocol, sfm_stroke, x0, y0, (double) (box.width - 1) / sc->vwidth);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so we're reusing a metrics color: "Color used to draw the (horizontal or) vertical line from the origin to the advance when that metric is selected in View". That's not ideal. Could we maybe add a color to fontview_re?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I admit this is hairy, as it will also involve changes to the appearance editor ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, there is no need to mess with Appearance Editor specifically, the new color definition should show up there automagically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iorsh thx for info. Helped me alot.
there is no need to mess with Appearance Editor specifically
it's true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more quick thing: Make an entry for this using the case-sensitive string you added in fontview_re ("MetricsGlyphContourColor") around here:
fontforge.FontView.MetricsAdvanceToColor: #008000 |
fontforge.FontView.MetricsGlyphContourColor: #3030C0
but I would also advise changing it and restarting the program to ensure the value is getting picked up properly.
@vasilky3 from your original screenshots it looks like you maybe didn't the resource directory configured for your system, but the more recent screenshot of the appearance editor looks more like what I would expect. Did you change something/get that working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working with cnc fonts. And it's hard to navigate dew to lack of glyph splines visualisation in the MainWindow.
![image](https://private-user-images.githubusercontent.com/43271561/386141047-1d0ecb08-fa17-4d14-b97e-02e9dbcbb37e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NDU2NzgsIm5iZiI6MTczODg0NTM3OCwicGF0aCI6Ii80MzI3MTU2MS8zODYxNDEwNDctMWQwZWNiMDgtZmExNy00ZDE0LWI5N2UtMDJlOWRiY2JiMzdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEyMzYxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM4YjA2NDNiNmJmNGI3MmQzNDU0NzY0ZWZlOTY2YmM5NzY0YWMxNjJiOTBjMjE2YzM0YTQwYTlhNDQ3NWE1YmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.N2-_zRo6Ite7WrOfhQUtMHORBYyr4p7LMmtPWOMFcm4)
So i added one.
Type of change
Code quality
I would say it's low. But somewhat consistent with surrounded code.
My main problem new method
fontview.c :: FVDrawOutlineOnly()
probably should be placed ingdrawP.h :: displayfuncs
.But i was confused trying to figure out how to achieve this.
Sorry for not putting spacing refactor in a separate commit.