It seems +Stuart Langridge
may be the only designer here not lacking work ethic and understanding of grade 5 arithmetic. This post exemplifies today's designers' laziness and denseness. Computers just do whatever it is we humans tell them too. So a computer sizing an icon is, and forever will be, simply doing math.
To reiterate Stuart's example: 24 is 1.5 times of 16. If you have a 3 pixel high rectangle in your 16 pixel squared asset, when you multiply by 1.5 you will have a 4.5 pixel rectangle in a 24 pixel squared asset. No matter how you tell the computer to do the math, it will never be a whole number that will automatically be placed so that it is on pixel.
This problem hasn't existed since the dawn of Apple's "retina" displays. It has been prevalent for years prior. There are already solutions out there. They just call for humans to know basic arithmetic and be willing to put in extra effort.
You certainly can use JS to grab different assets for different sizes. That is probably the best way for web work. For downloaded applications, you'll have to do something simliar. You'll have to create the various sized assets and programmatically call the correct ones for the correct resolutions—that is, of course, dependent on the programming language, runtime environment, and/or development tools used to create whatever it is you are creating. UIKit for iOS, for example, doesn't need you to do anything special beyond having two of the same asset, one with "@2x" appended (this gets trickier when creating a phone and pad app in one bundle). A font definitely won't help this (using a font just goes to show designer negligence). SVG won't do this (less lazy but not reliable, unless you create SVGs for the different sizes).
This means there is only one simple solution to all of this. It goes by the concept of Designer Diligence. You, Mr. and Ms. Designer are going to have to do extra work and learn how to do some simple math to get your assets on pixel for all various sizes, that is, if you care enough. No, it's not "easy," but it is your "job."