Allow custom font sizes

10 views
Skip to first unread message

la...@siu.edu

unread,
Jul 29, 2014, 9:33:29 PM7/29/14
to searchbar...@googlegroups.com
I currently have my searchbar's font set to be much larger through Stylish and a little CSS. However, Searchbar Autosizer doesn't realize this and so it doesn't increase the size of the searchbar enough to keep up with what I'm typing.

It would be great if the extension would sense a change in font sizes/families, but I would also be delighted with just a little input form in the preferences menu where I can set the amount of pixels each keypress should increase the width of the searchbar by.

Love your extension, by the way, my browsers go through tons of changes in its look and feel but Searchbar Autosizer is one of the few extensions that never get uninstalled.

Kevin Cox

unread,
Jul 29, 2014, 9:52:16 PM7/29/14
to la...@siu.edu, searchbar...@googlegroups.com
On 29/07/14 21:33, la...@siu.edu wrote:
> I currently have my searchbar's font set to be much larger through Stylish and a little CSS. However, Searchbar Autosizer doesn't realize this and so it doesn't increase the size of the searchbar enough to keep up with what I'm typing.
Yes, the way we measure the text is to create a label in the toolbar and
add the text to that. So if the typeface is different it will be wrong.
> It would be great if the extension would sense a change in font sizes/families, but I would also be delighted with just a little input form in the preferences menu where I can set the amount of pixels each keypress should increase the width of the searchbar by.
It's not that simple as every letter is a different width. The proper
solution is probably copying the font style from the searchbox to our
measuring label. However there are probably a lot of styles that can
change the size and I will likely miss some. However usually correct is
better than never correct. I'll look into this tomorrow.
> Love your extension, by the way, my browsers go through tons of changes in its look and feel but Searchbar Autosizer is one of the few extensions that never get uninstalled.
Thanks :D

Cheers,
Kevin

signature.asc

la...@siu.edu

unread,
Jul 30, 2014, 1:08:55 AM7/30/14
to searchbar...@googlegroups.com, la...@siu.edu

I like your approach at finding the number of pixels (using a letter or letters from the searchbar's font family to figure out an average). If that is too much trouble, I would suggest simply allowing us to enter in a size value in pixels for the increments. If that feature is available, I could select a monospaced font family and everything would work swimmingly. It'd also be much easier on you.

Thanks,
Cameron

Kevin Cox

unread,
Jul 30, 2014, 5:53:49 PM7/30/14
to la...@siu.edu, searchbar...@googlegroups.com
On 30/07/14 01:08, la...@siu.edu wrote:
> I like your approach at finding the number of pixels (using a letter
> or letters from the searchbar's font family to figure out an average).
> If that is too much trouble, I would suggest simply allowing us to
> enter in a size value in pixels for the increments. If that feature is
> available, I could select a monospaced font family and everything
> would work swimmingly. It'd also be much easier on you.

It isn't an average, we render the text (plus an extra character for the
next keystroke) and see exactly how long it is. Any other way is too
error prone (unless you are using monospace fonts).

I have a version that appears to work. It currently copies the "font"
property to the measuring label. There may be more properties that need
to be copied but they will have to be added as they are found.

Please give it a try and let me know how it works.
autosizer-3.0.0pre17.xpi
signature.asc

la...@siu.edu

unread,
Jul 31, 2014, 5:15:19 AM7/31/14
to searchbar...@googlegroups.com, la...@siu.edu

Unfortunately, it does not seem to work at all :(

Just so you know (I'm not sure how your extension works, this might not be relevant) I believe Stylish changes the font of the searchbar after it has loaded, so you could possibly be reading the original, unaltered font family. This is the only edit (through Stylish) I'm really making to the searchbox:

.searchbar-textbox {
font-size: 25px !important;
font-family:Levenim MT !important;
}

Kevin Cox

unread,
Jul 31, 2014, 1:22:54 PM7/31/14
to la...@siu.edu, searchbar...@googlegroups.com
Is there any reason you are styling .searchbar-textbox rather than
#searchbar? It doesn't really matter and I have attached another
version that handles this.
autosizer-3.0.0pre18.xpi
signature.asc

la...@siu.edu

unread,
Aug 1, 2014, 2:33:42 AM8/1/14
to searchbar...@googlegroups.com, la...@siu.edu
I probably just got that from a quick Google search a long time ago.

Your new update works great! Thanks for the fast response!

Kevin Cox

unread,
Aug 1, 2014, 10:12:31 AM8/1/14
to la...@siu.edu, searchbar...@googlegroups.com
On 01/08/14 02:33, la...@siu.edu wrote:
> Your new update works great! Thanks for the fast response!
No problem, if you could run it for a couple of days and try to break it
that would be great. If nothing goes wrong I will push a new version to
AMO.

Cheers,
Kevin


signature.asc

la...@siu.edu

unread,
Aug 8, 2014, 1:00:39 AM8/8/14
to searchbar...@googlegroups.com, la...@siu.edu

It's still working beautifully, however the alpha version you provided here keeps reverting itself to the official 3.0.2 release. Might just be because the alpha version is given a "3.0.0pre18" designation. I've turned updates off for now, I'll check in occasionally to see if you've rolled out an official update.

Thanks again!

Kevin Cox

unread,
Aug 8, 2014, 8:46:54 AM8/8/14
to la...@siu.edu, searchbar...@googlegroups.com
On 08/08/14 01:00, la...@siu.edu wrote:
> It's still working beautifully, however the alpha version you provided
> here keeps reverting itself to the official 3.0.2 release. Might just
> be because the alpha version is given a "3.0.0pre18" designation. I've
> turned updates off for now, I'll check in occasionally to see if
> you've rolled out an official update.
Thanks for checking that out, I'm a little busy at the moment but I will
release it as soon as I get a chance.

signature.asc
Reply all
Reply to author
Forward
0 new messages