I seem to recall a Rambam that says that if someone can work and chooses not to, there is no mitzvah to support such a person. But I can't find it. Am I mis-remembering?
EDIT: Is there something on the subject in the other rishonim and aharonim?
Are you maybe remembering the end of Hilkhot Tshuva (10:18) in Rambam’s Mishne Torah where he writes:
One should always strain oneself and endure hardship and not come to depend on others rather than cast oneself onto the community. Thus the sages commanded, "Make your Sabbaths into weekdays rather than come to depend on others." Even if one is wise and revered and becomes poor, he should engage in some kind of craft, even a menial one, rather than come to depend on others. [...] Great sages were splitters of wood, raisers of beams, drawers of water for gardens, ironworkers, and blacksmiths rather than ask [for their living] from the community or accept anything when they gave to them.
Or in the very last part (10:19) he writes:
Anyone who does not need [tzedakah] but deceives people and takes will not reach death in old age without having come to depend upon others [in reality].
You added in a comment above that you are also interested in views of other Rishonim and Ahronim. I would therefore point out some interesting sources from here
Rabbi Shmuel di Medina of Salonika (1506-1580) writes in his responsa (Teshuvos Maharshdam YD #166) that there is no obligation to provide charitable funds even to a poor person who has the capacity to work.
This view can further be buttressed with the explanation of the Kli Yakar on Chumash (Shmot 23:5): “You shall surely help with him” discussing the Mitzvah of Prikah and Teinah – assisting one’s fellow with a load.
This (the words “with him”) teaches you that it is only when he is with you in his work – and wishes to be established with you – then you are obligated to support him. However, if he sits and says, “Since the matter is upon you – you must lift it alone..” – it does not apply.
He further writes: “From here we have a response to a minority of the poor among our nation who place themselves upon the community and do not wish to work in any area of work even though they are able to do so.. And they cry foul if they are not given enough to sustain them. For on this, Hashem did not command, rather it states, “You shall surely help WITH HIM” and you shall surely establish it WITH HIM. For the poor person will do all he can find by himself to do, and if even then his hand cannot reach it, then each man of Israel is obligated to help him and strengthen him and give him what he is lacking.. even up to one hundred times.”
In Sefer Maalos HaMidos at the end of Hilchos Tzedakah, the author writes: “Nonetheless, it is worthy to refrain from giving him Tzedakah and embarrass him and shame him until he repents and tries working again so that he not be shameful in the eyes of people.”