when i use .css ('font-size') in jquery it returns the value in pixels, is there any way to get it to give it in points? because i want to use it in php gd and it requires the font size to be in dots
Try the following:
var fontSize = ... var points = parseInt(fontSize) * 72 / 96
If your is font-sizedefined in pt, you can access the property fontSize element.styleas follows ...
font-size
pt
fontSize
element.style
var element = document.getElementById('my_element'), //return size as it is defined fontSize = element.style.fontSize;
: (parseFloat ($ (this).css( "font-size" )) * 72.0/96.0). toFixed (2)
Source: https://habr.com/ru/post/1778572/More articles:Capture Enter key to trigger button click using javascript - javascriptHow to save multiple functions in an array in MATLAB? - arraysQemu-kvm command not found - qemuHow to compare two sounds in C # ....? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1778571/application-deploys-to-windows-phone-7-apps-rather-than-xbox-live&usg=ALkJrhhZRZMSo9Ab9T9FHRlUNsmNFW294gParsing an email message w Clip - perhaps without a tempfile? - ruby-on-railsIn Javascript, is there a way to convert an array of objects into function call parameters? - javascriptHow to request a timestamp in SQL Server 2008 with Linq-to-Entities? - .netHow can I get βnow friends withβ and βtagged inβ posts in the Facebook Graph API? - facebookImport SQLite database into Android emulator - androidAll Articles