-
Notifications
You must be signed in to change notification settings - Fork 179
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
Italics and Hide Font Variants #670
Comments
I believe the issue here is not removing font variants field at all. But instead we can remove "Italic" versions from the dropdown and automatically using "Italic" variants for italized markup. |
Yep, as Dima said the issue was not about removing the font variants field. Note that "Italic" is already not displayed among font variants. An additional complication discussed for using italic variants was selecting just part of the text and marking it italic. Related #413 |
Thank you. AC updated |
@swissspidy @miina @dvoytenko As we can see from the design, we don't have variants dropdown anymore. There is only font family and font weight dropdown select. Font variants like the Bold, Italic, Underline will be handled from Toggle selections. |
@ndev1991 That's correct, the discussion was exactly about using the font variants in case of the toggle buttons -- to use the selected font variants (if exists) instead of the browser default italic and bold. |
@pbakaus @swissspidy @jauyong This issue for version 1.0, do we supposed to handle bold and italic for entire text only? (not partial selection of text) |
@spacedmonkey @miina |
I see. @spacedmonkey @jauyong Can we have another ticket for api update here to unblock this issue? |
@ndev1991 It would be useful if you should define exactly what you need from WP and the REST API, before we create that ticket. |
@spacedmonkey Here is my understanding for this ticket. We are having font weights for each font when we get them through api. And that will be used for weights dropdown on font style panel. Currently there are multiple toggle options for italic, underline and bold for text. For bold option I think we need to collaborate with weights dropdown so when selected as Bold from dropdown it should be selected on toggle and also same goes on toggle to dropdown. And for italic and underline we are using default browser function here. I think underline makes sense to use default browser section based on this ticket. But the italic should be handled based on that font option. And we don't have that kind of records on fonts from the api. So I think we will need to get variants option from Would you confirm this is correct direction? @pbakaus @swissspidy @miina |
Nope:
Let me know if that makes sense, happy to answer additional questions. |
@spacedmonkey @jauyong @kmyram Can we have this api ticket created and be done before tomorrow morning? Unless the api ready until that time, I think this ticket can not be completed before Wednesday morning. |
@ndev1991 I created #876 for the API update. Can you fill out exactly what you need from WP and the REST API in the ticket? And can you assign it to whoever would work on this? I'm not sure who it would be? @spacedmonkey |
@jauyong details added to issue #876 but not assigned to anyone yet. I think it php side so should be @spacedmonkey or @miina |
@spacedmonkey @swissspidy @miina @pbakaus So for this issue, we need to use the font variant like the italic if exists. And no way to detect if the font variants exists or not currently. I can't see any fields that related with font variants from the fonts api. So I request api update for font variants. So basically I think a new field required that shows the available variants for this fonts. Like |
I'm super confused - we already have these variants... Like, we have them in the editor today: For some reason this dropdown currently doesn't show the italic variants though (maybe we're already filtering them?). |
We do have these variants in the dropdown, but they're hardcoded. Some fonts don't support things like super bold though. I think one thing discussed here is that the list should be dynamic depending on what the font supports (otherwise browser does handle boldness on its own). However, there seems to be a misunderstanding here and this is not actually wanted. I think what we want here is that when pressing the Italic toggle, we need to make sure the Italic font variant is loaded accordingly. @pbakaus can you perhaps clarify what was discussed here originally? |
OMG! This list needs to be dynamic or up to date. Facepalm. Please somebody prioritize this.
Yes, but that requires having access to the (real) variant list. |
So to summarize this:
Note: not all fonts support font weights. For example, Abel only supports "regular". No bold. No italic. How should we display the (If we need to disable the |
Yes to all of that, and rather sooner than later. These are critical to get right.
They're still working normally - in this case, the italic and bold buttons default to the browser approximation (
|
@pbakaus @swissspidy Here is the current implementation our version. And there are two types of bold at the moment. One through bold toggle and the other one is through font-weights dropdown. So the only thing here is to sync those both I think. Basically when select the bold from font-weights dropdown it set the font-weights of that text. But when select the bold from toggle it uses To summarize.
|
From what I can tell, this task should involve:
I added the following follow-up issues: #925, #923, #921, #922. |
@dvoytenko Thanks for your clarification. But not way to get the correct weights names defined for the font family |
It looks like the weight names are always the same. They are:
|
Ok. So perhaps point (1) is already WAI? Just need to change the hardcoded names? |
Yep. |
Feature Description
During Grooming on March 18, there was discussion around having a separate issue to handle italics and hiding font variants.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
Note:
QA Instructions
The text was updated successfully, but these errors were encountered: